CS FundamentalsVery hardGATE CS (PYQ pattern)

A 3-level feedback queue scheduler uses strict priority between levels. Level 0 has quantum 2 ms, level 1 has quantum 4 ms, level 2 is FCFS (run to completion). New jobs enter level 0; a job that uses its entire quantum drops one level; a job preempted by a newly arrived higher-level job goes to the tail of its own level and gets a fresh quantum later. Jobs (arrival, burst) in ms: A (0, 9), B (1, 3), C (3, 6), D (9, 2). At what time does job A complete?

  1. A. 20 ms
  2. B. 18 ms
  3. C. 23 ms
  4. D. 15 ms

Correct answer: A. 20 ms

Unit-step simulation of the rules gives completion times {'D': 11, 'B': 12, 'C': 16, 'A': 20}. A is demoted to level 1 and later to level 2, where it waits for every other job, so it finishes last.

More Operating Systems questions

Exams that ask this topic