CS FundamentalsVery hardGATE CS (PYQ pattern)

A disk has cylinders 0 to 199. The head is at cylinder 60 moving upward. Pending requests: 18, 150, 72, 41, 177, 95, 33, 124. C-LOOK serves the requests above the head in increasing order, then jumps (the jump counts as head movement) to the lowest pending request and continues upward. What is the total head movement?

  1. A. 276
  2. B. 140
  3. C. 379
  4. D. 299

Correct answer: D. 299

60 to 177 = 117, jump 177 to 18 = 159, then 18 to 41 = 23: total 299. 276 is what SSTF or LOOK gives; 140 forgets the jump; 379 is C-SCAN (to 199, back to 0, up to 41).

More Operating Systems questions

Exams that ask this topic