CS FundamentalsVery hardProduct company interview · GATE level
A TLB has 64 entries. With 4 KB pages, what is its reach (the memory it can map without a miss)? If 16 of the entries instead map 2 MB huge pages and the other 48 map 4 KB pages, what is the reach?
- A. 256 KB; 32,768 KB
- B. 256 KB; 32,960 KB
- C. 64 KB; 32,960 KB
- D. 256 KB; 131,072 KB
Correct answer: B. 256 KB; 32,960 KB
Reach = entries x page size. 64 x 4 KB = 256 KB. Mixed: 48 x 4 KB + 16 x 2048 KB = 192 + 32,768 = 32,960 KB, about 32 MB, over a hundred times more - which is why large working sets such as databases use huge pages. 32,768 KB forgets the 48 small-page entries, and 131,072 KB treats all 64 entries as 2 MB pages.
More Operating Systems questions
- Processes (arrival, burst) in ms: P1 (0, 10), P2 (1, 6), P3 (3, 2), P4 (5, 4), P5 (6, 1). Under preemptive SJF (SRTF), what is the average…
- Processes (arrival, burst) in ms: A (2, 6), B (3, 2), C (4, 1), D (12, 3), E (13, 2). The CPU is idle until the first arrival. Under…
- Round Robin, quantum 3 ms. Processes (arrival, burst): P1 (0, 7), P2 (1, 5), P3 (2, 3), P4 (4, 6). A process arriving at the same instant…
- Three CPU-bound processes arrive at time 0 in the order A (burst 5), B (burst 3), C (burst 8). Round Robin with quantum 2 is used. Not…
- Processes (arrival, burst): P1 (0, 3), P2 (2, 6), P3 (4, 4), P4 (6, 5), P5 (8, 2). Under non-preemptive Highest Response Ratio Next…
- Processes (arrival, burst, priority) with a smaller number meaning higher priority: P1 (0, 4, 3), P2 (1, 3, 2), P3 (2, 1, 4), P4 (3, 5…