CS FundamentalsModerateGATE CS (PYQ pattern)
A 4-level x86-64 style page table maps 4 KB pages through all four levels, 2 MB pages with the third-level entry as the leaf and 1 GB pages with the second-level entry as the leaf. The TLB lookup takes 1 ns and misses on 4% of accesses; of the misses, 70% are to 4 KB pages, 25% to 2 MB pages and 5% to 1 GB pages. Each memory access (page-table read or data) costs 100 ns and nothing is cached. What is the effective access time?
- A. 117.0 ns
- B. 119.6 ns
- C. 114.6 ns
- D. 115.6 ns
Correct answer: D. 115.6 ns
Page-table reads per miss: 0.70 x 4 + 0.25 x 3 + 0.05 x 2 = 3.65. EAT = 1 + 100 + 0.04 x 3.65 x 100 = 115.6 ns. Assuming every miss walks four levels gives 117 ns; adding the data access to the walk count again (4.65) gives 119.6 ns; leaving out the 1 ns TLB lookup gives 114.6 ns.
More Operating Systems questions
- A data TLB has 64 entries and the OS backs a 1.5 GB array with 2 MB pages. A program accesses array elements uniformly at random and…
- Reference string: 8, 6, 5, 3, 3, 1, 6, 8, 2, 6, 1, 7, 3, 8, 7, 3, 3, 4, 1, 2, 3, 2, 7, 2, 5, 4, 4, 7, 2, 5. What is the smallest number of…
- SRTF with processes (arrival, burst) in ms: P1 (0, 10), P2 (1, 6), P3 (2, 3), P4 (3, 8), P5 (5, 1), P6 (6, 2). Ties go to the earlier…
- Fixed priorities H > M > L, preemptive, one CPU. L arrives at 0: computes 2 ms, locks mutex m, computes 4 ms, unlocks, computes 1 ms. M…
- A bounded buffer has 3 slots: empty = 3, full = 0, mutex = 1 (classic implementation where a blocked wait leaves the semaphore negative)…
- Each of 8 processes P0..P7 waits for at most one other process (single-instance resources). The wait-for relation is: P0 waits for P1, P1…