Javatpoint Logo
Javatpoint Logo

Numerical on SSTF and SCAN

Question:

Suppose the following disk request sequence (track numbers) for a disk with 100 tracks is given: 45, 20, 90, 10, 50, 60, 80 and 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

(A) 5
(B) 9
(C) 10
(D) 11

Using SSTF Algorithm

Number of track are 100.

Initial Position of R/W head is 50.

The requests are: 45, 20, 90, 10, 50, 60, 80 and 70


OS Look Scheduling2

Number of crossed cylinders = 5 + 15 + 10 + 10 + 10 + 70 + 10 = 130

Using SCAN Algorithm


OS Look Scheduling3

Number of cylinders crosses = 0 + 10 + 10 + 10 + 10 + 10 + 55 + 20 + 10 = 135

Therefore the answer is (A). The SCAN algorithm travels for 5 additional tracks.






Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


B.Tech / MCA