Question

In: Computer Science

Task 4 . . . . . . . . . . . . . ....

Task 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Consider a disk drive with 2,000 tracks, numbered 0 to 1,999. The request queue has

the following composition: 1045 750 932 878 1365 1787 1245 664 1678 1897

The current position is 1167 and the previous request was served at 1250. For each

of the following disk scheduling algorithms, compute the total distance (in tracks)

that the disk arm would move. Explain how you arrive at your answers.

4.1       First-In-First-Out (FIFO)                                                                                (2)

4.2      Shortest-Service-Time-First (SSTF)                                                             (2)

4.3      SCAN (Without LOOK variation)                                                                     (2)

4.4      C-SCAN (Without C-LOOK variation) (2)

Solutions

Expert Solution

4.1)

FIFO -

Current position is 1167

In FIFO, the requests will be served in order that is 1045 750 932 878 1365 1787 1245 664 1678 1897

Number of movements -

1167 -> 1045 - 122

1045 -> 750 - 295

750 -> 932 - 182

932 -> 878 - 54

878 -> 1365 - 487

1365 -> 1787 - 422

1787 -> 1245 - 542

1245 -> 664 - 581

664 -> 1678 - 1014

1678 -> 1897 - 219

Now take sum of all these results

4.2)

SSTF - This algorithm services that request next which requires least number of head movements from its current position

Hence requests will be served in following order -

1167 -> 1245 -> 1365 -> 1678 -> 1787 -> 1897 -> 1045 -> 932 -> 878 -> 750 -> 664

I hope you can perform addition by yourself

4.3)

SCAN - Head starts from one end of the disk and move towards the other end servicing all the requests in between.After reaching the other end, head reverses its direction and move towards the starting end servicing all the requests in between.

Hence requests will be served in following order -

1167 -> 1245 -> 1365 -> 1678 -> 1787 -> 1897 -> 1045 -> 932 -> 878 -> 750 -> 664

I hope you can perform addition by yourself

4.4)

C - SCAN - Head starts from one end of the disk and move towards the other end servicing all the requests in between.After reaching the other end, head reverses its direction.It then returns to the starting end(that is 0) without servicing any request in between.The same process repeats.

Hence requests will be served in following order -

1167 -> 1245 -> 1365 -> 1678 -> 1787 -> 1897 -> 664 -> 750 -> 878 -> 932 -> 1045

I hope you can perform addition by yourself

I have tried to explain it in very simple language and I hope that i have answered your question satisfactorily.Leave doubts in comment section if any.


Related Solutions

Task 4: Develop Strategies for Improved Cultural Safety As part of this task, you are required...
Task 4: Develop Strategies for Improved Cultural Safety As part of this task, you are required to develop strategies for improved cultural safety when working with the Aboriginal and Torres Strait Islander people in your region (in relation to providing the information session). Activities you need to complete are provided in the questions below. Your answers must be 30-40 words each and specific to the Aboriginal and Torres Strait Islander people in your region and the information session being planned....
Task 4 The class Polynomials is a collection of polynomials of either implementation stored in an...
Task 4 The class Polynomials is a collection of polynomials of either implementation stored in an instance of the generic library class List. class Polynomials { private List<Polynomial> L; // Creates an empty list L of polynomials public Polynomials ( ) { … } (1 mark) // Retrieves the polynomial stored at position i in L public Polynomial Retrieve (int i) (1 mark) { … } // Inserts polynomial p into L public void Insert (Polynomial p) (1 mark) {...
Task ? 4          Specification: The following relationships exist among undertakings1, 2, 3, 4, 5 and 6:...
Task ? 4          Specification: The following relationships exist among undertakings1, 2, 3, 4, 5 and 6: Undertaking 1        Misters A and B are the board members. The largest shareholder is Mister D – 45%; Undertaking 2        is entirely owned by Undertaking 1; Undertaking 3        is entirely owned by Mr. B; Undertaking 4        is entirely owned by Mr. D; Undertaking 5        Chairman is the son of Mr. A; Undertaking 6        Wife of Mr. B is its employee. Assignment: To determine...
4.) You are managing a task on the critical path which has a BAC of $500,000....
4.) You are managing a task on the critical path which has a BAC of $500,000. The task is 80 percent complete. The team has completed 10 weeks on the task, and it was scheduled to take 10 weeks. You have spent $400,000 on the task so far. Calculate the cost performance index (CPI) and schedule performance index (SPI). Briefly explain what the reults mean.
Task 4 Critically comment on Ms. Nancy’s acceptance of the bank audit and explain what are...
Task 4 Critically comment on Ms. Nancy’s acceptance of the bank audit and explain what are the necessary steps that should be taken before accepting an audit engagement.
4) Write a brief reflection of Task 2 and 3 which may include description on data...
4) Write a brief reflection of Task 2 and 3 which may include description on data type used to solve the given task, variable used, and objects created. Reflection should also include justification on logic used to solve the given task along with proper references
TASK-4  Calculate the total quantity of materials required for a production process and the total funds required...
TASK-4  Calculate the total quantity of materials required for a production process and the total funds required to purchase the materials. Mr. Fateh is the operations manager in an electrical equipment manufacturing company producing 3 different products. He needs to prepare a materials requirement plan for all THREE of his Products A, B & C, that is good for 6 months operation. Prepare an MRP chart for him and calculate the total budget (money) required for these materials. The BOM for...
Task 4:         Tuples Explain what is the difference between list, string and tuple? Create a list...
Task 4:         Tuples Explain what is the difference between list, string and tuple? Create a list example and check whether you could change the item within the list. Create a string example and check whether you could change the item within the string. Create a tuple example and check whether you could change the item within the tuple.
      TASK                                    &nbs
      TASK                                                            1. Choose any Omani organization and write briefly about its corporate social responsibility activities or strategies.(400-500 words). If you are part of the decision making body of this organization, what type of new activity (towards social responsibility) you would like to add?            (5+5=10 Marks) 2. Compare between Omnipotent view of management and symbolic view of management.                                                                        3. Describe workplace spirituality. Identify its characteristics of a spiritual organization and its benefits.                                                                                                                          (1+2+2=5 Marks) 4. Explain workers compensation. How to...
Task 2 . . . . . . . . . . . . . ....
Task 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Five batch jobs, A through E, arrive at a computer at essentially...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT