In a disk system with 100 cylinders, the request to access the cylinders occur…
2021
In a disk system with 100 cylinders, the request to access the cylinders occur in the following sequence: 34, 4, 7, 19, 10, 83, 2, 6, 20, 15. Assuming that the head is currently at cylinder 50, then what is the time taken to satisfy all requests if it takes 1 second to move from one cylinder to another? (Shortest Seek Time First (SSTF) policy is used)
- A.
119 seconds
- B.
129 seconds
- C.
109 seconds
- D.
139 seconds
Attempted by 97 students.
Show answer & explanation
Correct answer: B
Total Cylinders: 100
Initial Head Position: 50
Request Queue: 34, 4, 7, 19, 10, 83, 2, 6, 20, 15
Movement Time: 1 second per cylinder
Algorithm: SSTF (Move to the closest request from the current head position)
Step-by-Step Calculation
Start at 50: The closest request is 34 (|50 - 34| = 16).
At 34: The closest request is 20 (|34 - 20| = 14).
At 20: The closest request is 19 (|20 - 19| = 1).
At 19: The closest request is 15 (|19 - 15| = 4).
At 15: The closest request is 10 (|15 - 10| = 5).
At 10: The closest request is 7 (|10 - 7| = 3).
At 7: The closest request is 6 (|7 - 6| = 1).
At 6: The closest request is 4 (|6 - 4| = 2).
At 4: The closest request is 2 (|4 - 2| = 2).
At 2: The only remaining request is 83 (|2 - 83| = 81).
Total Seek Distance:
16 + 14 + 1 + 4 + 5 + 3 + 1 + 2 + 2 + 81 = 129 cylinders
Total Time Taken:
129 cylinders x 1 second/cylinder = 129 seconds