CS FundamentalsVery hardGATE CS

Round Robin with quantum 2 runs A (arrival 0, burst 5), B (1, 3), C (2, 6) and D (4, 2). A newly arrived process joins the ready queue before a process preempted at the same moment, and every switch between DIFFERENT processes costs 1 time unit (none at time 0). In what order do they finish, and when does the last one finish?

  1. A. D, B, A, C; last at 16
  2. B. A, D, B, C; last at 22
  3. C. D, B, A, C; last at 24
  4. D. B, D, A, C; last at 24

Correct answer: C. D, B, A, C; last at 24

Schedule: A 0–2, B 3–5, C 6–8, A 9–11, D 12–14 (done), B 15–16 (done), C 17–19, A 20–21 (done), C 22–24 (done): 8 switches. 16 ignores the switch cost, and A, D, B, C comes from queueing the preempted process ahead of new arrivals.

More Operating Systems questions

Exams that ask this topic