CS FundamentalsHardGATE CS (PYQ pattern)
A machine uses 4-level paging, a TLB (10 ns lookup, done before every access) and 100 ns memory. On a TLB miss the walk first consults a page-walk cache (lookup time negligible) that holds the upper three levels: with probability 0.8 it hits and only the leaf entry is read from memory; otherwise all four levels are read from memory. Then the data is read. What is the minimum TLB hit ratio for an effective access time of at most 150 ns?
- A. 90%
- B. 60%
- C. 50%
- D. 75%
Correct answer: D. 75%
EAT = 10 + 100 + (1 - h) x W, with mean walk W = 0.8 x 100 + 0.2 x 400 = 160 ns. 110 + 160(1 - h) <= 150 gives 1 - h <= 0.25, h >= 75%. Ignoring the walk cache (W = 400) gives 90%; assuming it always hits (W = 100) gives 60%; counting only the 0.2 x 400 part (W = 80) gives 50%.
More Operating Systems questions
- Memory access takes 200 ns. A page fault takes 8 ms if the victim page is clean and 20 ms if it must first be written back; 60% of victim…
- Free memory consists of three holes (start, size in KB): (0, 300), (400, 200), (700, 500); everything else is allocated. Operations in…
- On a Unix file system with an empty directory /tmp/x (call it X), these commands run: mkdir X/a; mkdir X/a/b; mkdir X/a/c; touch X/a/f; ln…
- A process has 4 threads on a single CPU. Each thread computes for 10 ms, makes a blocking disk read that takes 30 ms, then computes for…
- 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…
- 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…