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?
- A. 21 ms
- B. 19 ms
- C. 23 ms
- 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
- Processes (arrival, burst): P1 (0, 3), P2 (1, 5), P3 (2, 2), P4 (4, 4). Which statement about the average waiting time is correct?
- Round Robin is used with quantum q = 10 ms and context-switch time s = 2 ms. All processes are CPU-bound with very long bursts, and the…
- Round Robin with quantum q and context-switch time s is used; every process does exactly one CPU burst of T ms with T < q. What is the CPU…
- Processes (arrival, burst): P1 (0, 5), P2 (1, 3), P3 (3, 6), P4 (4, 2), P5 (10, 4), scheduled by SRTF. During the first 12 ms (time 0 to…
- Round Robin with quantum 3 ms; processes (arrival, burst): P1 (0, 8), P2 (2, 5), P3 (4, 2), P4 (6, 4). A process arriving at the instant a…
- SJF predicts the next CPU burst by exponential averaging: τ(n+1) = α·t(n) + (1 − α)·τ(n), with α = 0.75 and initial guess τ(1) = 10 ms…