The GATE Grind

GATE 2015 CS – Question 56

Operating System · File Systems and Disk Performance · 2 marks · Numerical answer

Suppose the following disk request sequence (track numbers) for a disk with 100 tracks is given: 45, 20, 90, 10, 50, 60, 80, 25, 70. Assume that the initial position of the R/W head is on track 50. The additional distance that will be traversed by the R/W head when the Shortest Seek Time First (SSTF) algorithm is used compared to the SCAN (Elevator) algorithm (assuming that SCAN algorithm moves towards 100 when it starts execution) is ________ tracks.

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: 10

Explanation

SSTF serves 50, then 45, 60, 70, 80, 90, 25, 20, 10. The head moves $5 + 15 + 10 + 10 + 10 + 65 + 5 + 10 = 130$ tracks. SCAN goes up from 50 to the end at 100, which is 50 tracks, then back down to 10, which is 90 tracks, for a total of 140. The difference is $140 - 130 = 10$.