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

In disk scheduling example, suppose the disk tracks are numbered from 0 to 49. Head is presently positioned at track 15 and requests for tracks 4, 40, 11, 35, 7 and 14 have arrived (in that order). It takes 1 ms to travel from one track to the next adjacent track. Following disk scheduling algorithms are to be executed and total time traversed is to be recorded (in ms) in ascending order (assume arm-movement toward high numbered request first, wherever needed):
A. FCFS
B. LOOK
C. SSTF
D. SCAN
Choose the correct answer from the options given below:

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

Show answer & explanation

Correct answer: A. C, B, D, A

Explanation

FCFS services requests in arrival order 15→4→40→11→35→7→14: total = 11+36+29+24+28+7 = 135 ms. SSTF always jumps to the nearest pending request: 15→14→11→7→4→35→40, giving 1+3+4+3+31+5 = 47 ms. LOOK sweeps toward the high end first, reverses at the last request (not the disk edge): 15→35→40 (up, 25 ms) then 40→14→11→7→4 (down, 36 ms) = 61 ms. SCAN sweeps all the way to the disk boundary (track 49) before reversing: 15→35→40→49 (25 ms) then 49→4 (down, 45 ms) = 79 ms. Ranking ascending: SSTF(47)

More System Software and Operating System questions