CS FundamentalsVery hardGATE CS
A machine has 46-bit virtual addresses, 16 KB pages, 40-bit physical addresses, and each page-table entry holds the frame number plus 6 flag bits, rounded up to a power-of-two number of bytes. Every page-table node must fit exactly in one page except the top node, which takes the leftover VPN bits. What is the number of levels needed and the size of the top-level table?
- A. 3 levels, 8 KB
- B. 3 levels, 4 KB
- C. 4 levels, 16 KB
- D. 3 levels, 1 KB
Correct answer: D. 3 levels, 1 KB
Frame number = 40−14 = 26 bits, plus 6 = 32 bits = 4-byte entries. A 16 KB page holds 4096 = 2¹² entries. VPN = 46−14 = 32 bits, so 12+12 uses two levels and leaves 8 bits for the top: 3 levels, with a top table of 2⁸ × 4 B = 1 KB.
More Operating Systems questions
- A parent has 1000 pages mapped copy-on-write after fork, all initially shared. The child then writes to 100 distinct pages, and afterwards…
- A bounded-buffer monitor with Mesa-style signalling uses: get() { if (count == 0) wait(notEmpty); item = buf[out]; count--; ... } and…
- A three-level feedback queue: Q0 (quantum 2), Q1 (quantum 4), Q2 (FCFS). New processes join Q0 and preempt lower queues; a process that…
- The reference string of a process is 1 2 1 3 4 4 5 2 3 2 2 6 7 7 6 1. Using a working-set window of the last 5 references (including the…
- The page reference string is 1 2 3 4 2 1 5 6 2 1 2 3 7 6 3 2 1 2 3 6 and 3 frames are available (initially empty). The numbers of page…
- Five processes arrive with burst times: P1 (arrival 0, burst 8), P2 (1, 4), P3 (2, 9), P4 (3, 5), P5 (4, 2). Under preemptive SJF (SRTF)…