CS FundamentalsModerateGATE CS (PYQ pattern)
Round Robin uses a 20 ms quantum and every context switch costs 2 ms; all n processes are CPU-bound and always use the full quantum. From the moment a process is preempted until it starts running again, the CPU performs one switch, then for each of the other n - 1 processes a quantum followed by a switch. If this gap must not exceed 200 ms, what is the largest n?
- A. 11
- B. 10
- C. 9
- D. 8
Correct answer: B. 10
Gap = n switches + (n - 1) quanta = 2n + 20(n - 1) = 22n - 20 <= 200, so n <= 10. Ignoring switches gives 20(n - 1) <= 200, n = 11; charging n full quanta plus switches gives 22n <= 200, n = 9.
More Operating Systems questions
- A ticket lock has nextticket = 10 and nowserving = 10 (free). Events in order: T1 acquires, T2 acquires, T3 acquires, T1 releases, T4…
- Which of the following statements about read-copy-update (RCU) are correct? I. Readers traverse the data structure without taking locks…
- Which of the following statements about fork() with copy-on-write are correct? I. Right after fork, parent and child map the same physical…
- Under first-fit, the fifty-percent rule says that with N allocated blocks there are about N/2 holes. In a measured system the average hole…
- A machine has 48-bit virtual addresses, 16 KB pages and 8-byte page-table entries. Every page-table node must fit in one page, lower…
- Two processes bounce a 1-byte message through a pair of pipes: 100,000 round trips take 1.2 s, and each round trip contains two context…