CS FundamentalsHardGATE CS (PYQ pattern)

Round Robin runs 10 always-runnable, CPU-bound processes; every context switch costs 0.5 ms and each process always uses its full quantum q. Two requirements: switching overhead must be at most 10% of CPU time, and after a process is preempted it must be running again within 50 ms (the gap contains the other 9 quanta and 10 switches). Which range of q satisfies both?

  1. A. 5 ms <= q <= 5.5 ms
  2. B. 4.5 ms <= q <= 5 ms
  3. C. 4.5 ms <= q <= 5.5 ms
  4. D. 4 ms <= q <= 5 ms

Correct answer: B. 4.5 ms <= q <= 5 ms

Overhead: 0.5 / (q + 0.5) <= 0.1 gives q >= 4.5 ms (taking 0.5 / q <= 0.1 wrongly gives q >= 5). Latency: 9q + 10 x 0.5 <= 50 gives q <= 5 ms (ignoring the switches gives q <= 5.56). So 4.5 <= q <= 5 ms.

More Operating Systems questions

Exams that ask this topic