CS FundamentalsHardGATE CS
A 32-bit machine uses two-level paging with 4 KB pages and 4-byte entries (10+10+12 split). A process has 6 MB of code and data starting at address 0, a 5 MB heap starting at 0x40000000 and a 3 MB stack ending at the top of the address space. Every page table is allocated only when needed. What is the total memory used by page tables (top level included)?
- A. 20 KB
- B. 28 KB
- C. 24 KB
- D. 32 KB
Correct answer: C. 24 KB
Each second-level table maps 4 MB. 6 MB at 0 needs 2 tables, the 5 MB heap on a 4 MB boundary needs 2, the 3 MB stack lies inside the last 4 MB region and needs 1: 5 second-level tables plus the top-level table = 6 pages = 24 KB.
More Operating Systems questions
- 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…
- 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…