CS FundamentalsHardTCS NQT · Infosys pattern
A disk has cylinders 0–199 and the head is at cylinder 76, moving towards cylinder 0. Pending requests: 45, 130, 12, 180, 90, 150, 60, 170. What is the total head movement under SCAN (elevator), which travels to the end of the disk before reversing?
- A. 232
- B. 260
- C. 276
- D. 256
Correct answer: D. 256
SCAN services every request in the direction of travel, continues to cylinder 0, then reverses: total movement 256 cylinders. LOOK would instead turn around right after the last request in that direction, giving only 232.
More Operating Systems questions
- A disk has cylinders 0–199 and the head is at cylinder 76, moving towards cylinder 0. Pending requests: 45, 130, 12, 180, 90, 150, 60…
- A disk has cylinders 0–199 and the head is at cylinder 50. Pending requests: 55, 58, 39, 18, 90, 160, 150, 38, 184. What is the total head…
- A disk has cylinders 0–199 and the head is at cylinder 60. Pending requests: 34, 197, 8, 120, 76, 160, 44, 105. What is the total head…
- A disk has cylinders 0–199 and the head is at cylinder 60, moving towards cylinder 199. Pending requests: 34, 197, 8, 120, 76, 160, 44…
- A disk has cylinders 0–199 and the head is at cylinder 60, moving towards cylinder 199. Pending requests: 34, 197, 8, 120, 76, 160, 44…
- A disk has cylinders 0–199 and the head is at cylinder 90. Pending requests: 15, 45, 75, 105, 135, 165, 30, 195. What is the total head…