CS FundamentalsVery hardGATE CS

A 3-level feedback queue: Q0 is RR with quantum 4, Q1 is RR with quantum 8, Q2 is FCFS. New processes enter Q0; a process that uses its full quantum is demoted one level; a lower queue runs only when all higher ones are empty, and an arrival in Q0 preempts a process running from a lower queue (the preempted process returns to the tail of its own queue). Processes (arrival, burst): A (0, 14), B (2, 6), C (5, 3). At what time does A complete?

  1. A. 21 ms
  2. B. 19 ms
  3. C. 23 ms
  4. D. 25 ms

Correct answer: C. 23 ms

Trace: A 0-4 | B 4-8 | C 8-11 | A 11-19 | B 19-21 | A 21-23. A finishes last at 23 ms, since every process gets its Q0 turn before A's long remainder runs from lower queues.

More Operating Systems questions

Exams that ask this topic