Consider a disk system with 100 cylinders. The requests to access the…

2019

Consider a disk system with 100 cylinders. The requests to access the cylinders occur in the following sequences:

4,34,10,7,19,73,2,15,6,20

Assuming that the head is currently at cylinder 50, what is the time taken to satisfy all requests if it takes 1 ms to move from the cylinder to adjacent one and the shortest seek time first policy is used?

  1. A.

    357 ms

  2. B.

    238 ms

  3. C.

    276 ms

  4. D.

    119 ms

Attempted by 166 students.

Show answer & explanation

Correct answer: D

Apply Shortest Seek Time First (SSTF) starting from head at cylinder 50. At each step pick the pending request with the smallest distance from the current head.

  1. Step 1: Move from 50 to 34, distance 16. (Total = 16)

  2. Step 2: Move from 34 to 20, distance 14. (Total = 30)

  3. Step 3: Move from 20 to 19, distance 1. (Total = 31)

  4. Step 4: Move from 19 to 15, distance 4. (Total = 35)

  5. Step 5: Move from 15 to 10, distance 5. (Total = 40)

  6. Step 6: Move from 10 to 7, distance 3. (Total = 43)

  7. Step 7: Move from 7 to 6, distance 1. (Total = 44)

  8. Step 8: Move from 6 to 4, distance 2. (Total = 46)

  9. Step 9: Move from 4 to 2, distance 2. (Total = 48)

  10. Step 10: Move from 2 to 73, distance 71. (Total = 119)

Total head movement = 119 cylinders. With 1 ms per cylinder, the time required = 119 ms.

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Mppsc Assistant Professor