Consider an imaginary disk with 40 cylinders. A request come to read a block…
2014
Consider an imaginary disk with 40 cylinders. A request come to read a block on cylinder 11. While the seek to cylinder 11 is in progress, new requests come in for cylinders 1, 36, 16, 34, 9 and 12 in that order. The number of arm motions using shortest seek first algorithm is
- A.
111
- B.
112
- C.
60
- D.
61
Attempted by 144 students.
Show answer & explanation
Correct answer: D
Answer: 61 arm motions.
Explanation: While the seek to cylinder 11 is in progress, the new requests that arrive are cylinders 1, 36, 16, 34, 9 and 12. Once the head reaches cylinder 11, apply the Shortest Seek First (SSTF) algorithm to the pending requests.
Service order chosen by SSTF starting at cylinder 11:
From 11 to 12 (distance 1)
From 12 to 9 (distance 3)
From 9 to 16 (distance 7)
From 16 to 1 (distance 15)
From 1 to 34 (distance 33)
From 34 to 36 (distance 2)
Total movement = 1 + 3 + 7 + 15 + 33 + 2 = 61
Note: The initial seek to cylinder 11 is already in progress and is not part of these additional arm motions; the calculation starts from the head position at cylinder 11.
A video solution is available for this question — log in and enroll to watch it.