CS FundamentalsHardGATE

Processes (arrival, burst) in ms: P1 (arrival 0, burst 7), P2 (arrival 2, burst 2), P3 (arrival 2, burst 4), P4 (arrival 5, burst 8). They are scheduled by non-preemptive Highest Response Ratio Next, where response ratio = (waiting time + burst) / burst, recomputed whenever the CPU becomes free. What is the average waiting time?

  1. A. 5.5 ms
  2. B. 5 ms
  3. C. 6 ms
  4. D. 4 ms

Correct answer: B. 5 ms

Recomputing the ratio each time the CPU frees up and always picking the highest gives completion times P1 7, P2 9, P3 13, P4 21, averaging 5 ms waiting. Plain non-preemptive SJF, which ignores the aging term, instead gives 5 ms.

More Operating Systems questions

Exams that ask this topic