A disk drive has 100 cylinders, numbered 0 to 99. Disk requests come to the…
2015
A disk drive has 100 cylinders, numbered 0 to 99. Disk requests come to the disk driver for cylinders 12,26,24,4,42,8 and 50 in that order. The driver is currently serving a request at a cylinder 24. A seek takes 6 msec per cylinder moved. How much seek time is needed for shortest seek time first (SSTF) algorithm ?
- A.
0.984 sec
- B.
0.396 sec
- C.
0.738 sec
- D.
0.42 sec
Attempted by 143 students.
Show answer & explanation
Correct answer: D
Key idea: Use Shortest Seek Time First (SSTF): at each step, pick the pending request closest to the current head position.
Starting state:
Initial head position: 24 (the request at 24 is served immediately, distance 0).
Pending requests after that: 12, 26, 4, 42, 8, 50.
SSTF sequence and movements:
Move 24 → 26: distance = 2 (cumulative = 2)
Move 26 → 12: distance = 14 (cumulative = 16)
Move 12 → 8: distance = 4 (cumulative = 20)
Move 8 → 4: distance = 4 (cumulative = 24)
Move 4 → 42: distance = 38 (cumulative = 62)
Move 42 → 50: distance = 8 (cumulative = 70)
Total head movement = 70 cylinders.
Seek time calculation: 70 cylinders × 6 ms/cylinder = 420 ms = 0.42 sec.
Answer: 0.42 sec.
A video solution is available for this question — log in and enroll to watch it.