CS FundamentalsVery hardGATE CS · Advanced

A multilevel feedback queue has three queues: Q0 (round robin, quantum 4 ms), Q1 (round robin, quantum 8 ms) and Q2 (FCFS). Queues are served in strict priority order. Every new process enters Q0; a process that uses its whole quantum drops one queue; a process preempted by a higher queue's arrival rejoins the tail of its own queue with a fresh quantum. When two processes arrive at the same time, the one with the lower id enters first. Processes (arrival ms, CPU burst ms): P1 (9, 14), P2 (9, 3), P3 (17, 10), P4 (0, 15), P5 (3, 5). What is the average turnaround time?

  1. A. 24.4 ms
  2. B. 23.0 ms
  3. C. 26.0 ms
  4. D. 27.2 ms

Correct answer: C. 26.0 ms

Simulate millisecond by millisecond with the priority rules; the turnaround times are [38, 7, 26, 45, 14], averaging 26.0 ms. Plain round robin or FCFS give different averages (24.4 ms, 23.0 ms).

More Operating Systems questions

Exams that ask this topic