CS FundamentalsHardTCS NQT · Infosys pattern
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, 105. What is the total head movement under LOOK, which reverses as soon as there are no more requests ahead of it?
- A. 330
- B. 341
- C. 317
- D. 326
Correct answer: D. 326
LOOK services requests in the direction of travel but reverses immediately after the farthest pending request in that direction, instead of running all the way to the disk's edge: total movement 326 cylinders, versus 330 for full SCAN.
More Operating Systems questions
- 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…
- A disk has cylinders 0–199 and the head is at cylinder 90, moving towards cylinder 0. Pending requests: 15, 45, 75, 105, 135, 165, 30…
- A disk has cylinders 0–199 and the head is at cylinder 90, moving towards cylinder 0. Pending requests: 15, 45, 75, 105, 135, 165, 30…
- A disk has cylinders 0–199 and the head is at cylinder 70. Pending requests: 12, 78, 145, 33, 167, 92, 56, 188. What is the total head…
- A disk has cylinders 0–199 and the head is at cylinder 70, moving towards cylinder 199. Pending requests: 12, 78, 145, 33, 167, 92, 56…
- A disk has cylinders 0–199 and the head is at cylinder 70, moving towards cylinder 199. Pending requests: 12, 78, 145, 33, 167, 92, 56…