Suppose the following disk request sequence (track numbers) for a disk with…
2015
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
Answer: B. 10 — First, calculate SSTF distance starting from track 50. The sequence is 45(5), 60(15), 70(10), 80(10), 90(10), 25(65), 20(5), 10(10). Total SSTF distance is…
- A.
20
- B.
10
- C.
15
- D.
5
Attempted by 8 students.
Show answer & explanation
Correct answer: B
First, calculate SSTF distance starting from track 50. The sequence is 45(5), 60(15), 70(10), 80(10), 90(10), 25(65), 20(5), 10(10). Total SSTF distance is 130 tracks.
Next, calculate SCAN distance moving towards 100. It goes to track 90 (distance 40), then reverses to track 10 (distance 80). Total SCAN distance is 120 tracks.
The difference is 130 - 120 = 10 tracks.
A video solution is available for this question — log in and enroll to watch it.