All mock tests are FREE till 31 December — register to save your progress

A disk queue has requests for I/O on cylinders 98, 183, 37, 122, 14, 124, 65, 67, with the disk head currently at cylinder 53. Using the shortest seek time first (SSTF) disk scheduling algorithm, what is the total head movement (in cylinders) needed to service all requests?

Pick an option to check yourself, or open the answer below.

Show answer & explanation

Correct answer: C. 236

Explanation

SSTF always services whichever pending request is closest to the head's current position. From 53 the nearest request is 65 (distance 12); from 65 the nearest remaining is 67 (distance 2); then 37 (distance 30); then 14 (distance 23); then 98 (distance 84); then 122 (distance 24); then 124 (distance 2); and finally 183 (distance 59). Summing these moves: 12+2+30+23+84+24+2+59 = 236 cylinders, matching option (iii).

More Database Management Systems questions