CS FundamentalsVery hardGATE CS (PYQ pattern)
Two CPU-bound processes alternate on one core, 100 context switches per second. Each has a 40-page working set in the TLB (64 entries). Without address-space IDs the TLB is flushed on every switch and each of the 40 pages must be re-walked (0.5 microseconds per miss); with ASIDs no entries are lost. What fraction of CPU time does the flushing waste?
- A. 0.4%
- B. 0.02%
- C. 0.8%
- D. 0.2%
Correct answer: D. 0.2%
Misses per second = 100 x 40 = 4000; each costs 0.5 microseconds, so 2 ms per second = 0.2% of CPU time.
More Operating Systems questions
- A thread runs on node 0 of a 4-node NUMA machine. Access latency is 80 ns to node 0, 140 ns to nodes 1 and 2 (one hop) and 200 ns to node…
- A physically indexed 1 MB, 8-way set-associative L2 cache with 64-byte lines sits under a system with 4 KB pages and 4 GB of RAM. How many…
- A slab allocator builds each slab from two contiguous 4 KB pages. A slab has a 16-byte header and holds as many 200-byte objects as fit…
- LRU-2 replacement: on a fault the victim is the resident page whose SECOND most recent reference is oldest (a page referenced only once…
- The aging algorithm keeps an 8-bit counter per page (initially 0). At every clock tick each counter is shifted right by one bit and the…
- A single resource has 9 units and three processes have maximum claims 6, 5 and 4. Consider every possible current allocation (a0, a1, a2)…