Consider a disk system having 60 cylinders. Disk requests are received by a…
2020
Consider a disk system having 60 cylinders. Disk requests are received by a disk drive for cylinders 10,22,20,2,40,6 and 38, in that order. Assuming the disk head is currently at cylinder 20, what is the time taken to satisfy all the requests if it takes 2 milliseconds to move from one cylinder to adjacent one and Shortest Seek Time First (SSTF) algorithm is used?
- A.
240 milliseconds
- B.
96 milliseconds
- C.
120 milliseconds
- D.
112 milliseconds
Attempted by 171 students.
Show answer & explanation
Correct answer: C
Key idea: Shortest Seek Time First (SSTF) always selects the pending request nearest to the current head position.
Service sequence and per-step distances (starting head = 20):
Serve cylinder 20: distance 0
Move to cylinder 22: distance 2
Move to cylinder 10: distance 12
Move to cylinder 6: distance 4
Move to cylinder 2: distance 4
Move to cylinder 38: distance 36
Move to cylinder 40: distance 2
Total head movement = 0 + 2 + 12 + 4 + 4 + 36 + 2 = 60 cylinders.
Total time: 60 cylinders × 2 ms per cylinder = 120 milliseconds.
A video solution is available for this question — log in and enroll to watch it.