GATE Computer ScienceVery hardGATE CS (PYQ pattern)
A 32-bit machine uses a two-level page table: 10-bit top index, 10-bit second-level index, 12-bit offset, 4-byte entries, every table exactly one 4 KB page. A process maps code at 0x00400000–0x0040FFFF, a heap of 8 MB starting at 0x10000000, and a 16 KB stack ending just below 0xC0000000. How many bytes of page tables does it need (count the top-level table)?
- A. 16 KB
- B. 24 KB
- C. 20 KB
- D. 12 KB
Correct answer: C. 20 KB
Each second-level table maps 4 MB (top index = address >> 22). Code: index 1 → 1 table. Heap: 0x10000000 starts at index 64 and 8 MB spans indices 64 and 65 → 2 tables. Stack 0xBFFFC000–0xBFFFFFFF: index 767 → 1 table. 4 second-level tables + 1 top-level = 5 pages = 20 KB.
Practise more Computer Organization and Architecture questionsComputer Organization and Architecture: notes and key points
More Computer Organization and Architecture questions
- A machine has 48-bit virtual addresses, 4 KB pages and 16 GB of RAM (1 GB = 2³⁰ B). Its inverted page table has one entry per frame…
- Booth's algorithm multiplies M = 0110 (+6) by Q = 1011 (−5) with a 4-bit accumulator A (initially 0000) and a bit Q₋₁ (initially 0). Each…
- Machine X runs a program of 5×10⁹ instructions at 2400 MIPS. Machine Y, with a different ISA and compiler, needs only 3×10⁹ instructions…
- Which of the following statements about virtual memory hardware are correct? I. A TLB caches recently used page-table entries. II. A page…
- Design X runs at 2.0 GHz and, with no branch prediction, charges 2 cycles for each taken branch. Design Y runs at 1.8 GHz and charges 0…
- An 8-bit value is stored with an even-parity Hamming code in 12 positions 1..12 (check bits at positions 1, 2, 4, 8). The word read back…