Skip to main content

GATE CSE 2015Operating System › I/O, Disk Scheduling & File SystemsVerified

GATE CSE 2015 PYQ: Suppose the following disk request sequence (track numbers) for a disk with 100 100 100 tracks is given: 45…

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.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.

    Answer

    10

    Approach

    Compute the total head movement for SSTF and SCAN separately. The difference between the two totals gives the required additional distance.

    SSTF total head movement is 130 tracks, while SCAN total is 140 tracks. Therefore the additional distance traversed by SSTF compared to SCAN is 10 tracks (SSTF takes 10 tracks less).

    Reviewed by GateIQ Editorial Team: IIT & IISc Alumni.