CS FundamentalsVery hardGATE CS (PYQ pattern)

Highest Response Ratio Next (non-preemptive; ratio = (waiting time + burst) / burst, evaluated whenever the CPU becomes free) schedules processes (arrival, burst) in ms: A (0, 8), B (1, 5), C (2, 1), D (3, 2), E (4, 3), F (20, 4). Ties go to the earlier arrival. In what order do they run?

  1. A. A, C, D, B, E, F
  2. B. A, C, D, E, B, F
  3. C. A, B, C, D, E, F
  4. D. A, C, E, D, B, F

Correct answer: B. A, C, D, E, B, F

At t = 8: ratios B (7+5)/5 = 2.4, C (6+1)/1 = 7, D (5+2)/2 = 3.5, E (4+3)/3 = 2.33, so C runs; at t = 11, E (7+3)/3 = 3.33 beats B (10+5)/5 = 3, which is why B is late. The full order is A, C, D, E, B, F (completion times {'A': 8, 'C': 9, 'D': 11, 'E': 14, 'B': 19, 'F': 24}).

More Operating Systems questions

Exams that ask this topic