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?
- A.
357 ms
- B.
238 ms
- C.
276 ms
- 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.
Step 1: Move from 50 to 34, distance 16. (Total = 16)
Step 2: Move from 34 to 20, distance 14. (Total = 30)
Step 3: Move from 20 to 19, distance 1. (Total = 31)
Step 4: Move from 19 to 15, distance 4. (Total = 35)
Step 5: Move from 15 to 10, distance 5. (Total = 40)
Step 6: Move from 10 to 7, distance 3. (Total = 43)
Step 7: Move from 7 to 6, distance 1. (Total = 44)
Step 8: Move from 6 to 4, distance 2. (Total = 46)
Step 9: Move from 4 to 2, distance 2. (Total = 48)
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.