CS FundamentalsModerateGATE CS · Product-company placement
A TLB has 64 entries. A program randomly touches a 100 MB data set. What is the TLB reach with 4 KB pages and with 2 MB huge pages, and what follows?
- A. 256 KB and 128 MB; with huge pages the whole data set fits in the TLB's reach
- B. 64 KB and 64 MB; neither covers the data
- C. 256 MB and 128 GB; both cover it
- D. 4 KB and 2 MB; huge pages make no difference
Correct answer: A. 256 KB and 128 MB; with huge pages the whole data set fits in the TLB's reach
Reach = entries × page size: 64 × 4 KB = 256 KB, far below 100 MB, so random access misses constantly; 64 × 2 MB = 128 MB covers the whole set. This is why databases and JVMs use huge pages.
More Operating Systems questions
- A spin lock is built from an atomic test-and-set: while (TestAndSet(&lock)) ; / critical section / lock = false;. Which property does it…
- Processes (arrival, burst): P1 (0, 8), P2 (1, 4), P3 (2, 9), P4 (3, 5), P5 (6, 2). Under SRTF (preemptive SJF; a running process keeps the…
- Round Robin with quantum 3; processes (arrival, burst): A (0, 7), B (2, 4), C (4, 6), D (5, 3). A process arriving at the same moment…
- Preemptive priority scheduling (smaller number = higher priority; a running process is not preempted by an equal priority). Processes…
- Non-preemptive SJF; processes (arrival, burst): P1 (0, 3), P2 (5, 6), P3 (6, 2), P4 (7, 1), P5 (8, 4). The CPU idles when nothing is…
- Highest Response Ratio Next (non-preemptive; ratio = (waiting + burst) / burst). Processes (arrival, burst): A (0, 8), B (1, 4), C (2, 2)…