CS FundamentalsHardGATE CS
A machine has 32 GB of physical memory, 4 KB frames and an inverted page table with 8-byte entries. How big is the table, and why is a hash table usually added?
- A. 64 MB per process; the hash speeds up context switches
- B. 8 MB for the whole system; the hash stores the frame numbers
- C. 32 MB for the whole system; the hash replaces the TLB
- D. 64 MB for the whole system; without a hash, finding (pid, page) would mean searching all entries
Correct answer: D. 64 MB for the whole system; without a hash, finding (pid, page) would mean searching all entries
There is one entry per frame: 2³⁵ / 2¹² = 2²³ entries × 8 bytes = 64 MB, shared by all processes. Because the table is indexed by frame, a lookup by (pid, virtual page) needs a hash on that pair to avoid a linear search.
More Operating Systems questions
- Which statements are correct? 1. A child that has exited but whose parent has not called wait() is a zombie. 2. A zombie still holds its…
- The reference string at times 1–12 is 3, 5, 3, 8, 2, 5, 5, 9, 3, 9, 2, 2. With a working-set window Δ = 5 references, what are the…
- A device delivers data at 2 MB/s. Per-byte interrupts would cost 5 µs each; instead DMA moves 4 KB blocks and raises one interrupt per…
- 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…
- 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…