CS FundamentalsVery hardGATE CS (PYQ pattern)

A disk head is at cylinder 50 at t = 0, moving towards higher cylinders, and needs 1 time unit per cylinder (service itself is instantaneous). The LOOK policy keeps going in the current direction while there is a pending request ahead, reverses only when nothing is ahead, and serves requests the moment the head is on their cylinder. Requests (arrival time, cylinder): (0,60), (0,30), (5,70), (8,40), (15,20), (20,90). What is the sum of the waiting times (service time minus arrival time) of all six requests?

  1. A. 342
  2. B. 307
  3. C. 322
  4. D. 367

Correct answer: C. 322

Simulating the head movement step by step gives service times that sum to a total wait of 322 (the run ends at t = 110).

More Operating Systems questions

Exams that ask this topic