CS FundamentalsHardGATE CS

Round Robin, quantum 3 ms. Processes (arrival, burst): P1 (0, 7), P2 (1, 5), P3 (2, 3), P4 (4, 6). A process arriving at the same instant a quantum expires is placed in the ready queue before the preempted process. At what time does P4 complete?

  1. A. 22 ms
  2. B. 18 ms
  3. C. 21 ms
  4. D. 17 ms

Correct answer: C. 21 ms

Gantt chart: P1 0-3 | P2 3-6 | P3 6-9 | P1 9-12 | P4 12-15 | P2 15-17 | P1 17-18 | P4 18-21. P4 completes at 21 ms. Note the queue order at each expiry: newly arrived processes join the tail before the preempted one.

More Operating Systems questions

Exams that ask this topic