CS FundamentalsVery hardGATE CS
A 32-bit system uses two-level paging with 4 KB pages and 4-byte entries (a 1024-entry outer table, each inner table mapping 4 MB). A process uses only 16 MB of code at the bottom of its address space and 1 MB of stack at the top. How much memory do its page tables need?
- A. 4 MB
- B. 20 KB
- C. 24 KB
- D. 8 KB
Correct answer: C. 24 KB
The 16 MB of code needs 4 inner tables and the 1 MB stack 1 more (it fits inside one 4 MB region), plus the outer table: 6 pages of 4 KB = 24 KB. A flat table would need 4 MB.
More Operating Systems questions
- A disk spins at 7200 RPM, has 400 sectors of 512 bytes per track and an average seek of 5 ms. About how long does it take on average to…
- Processes typically run 40 ms of CPU before blocking for I/O. Round Robin uses a quantum of 8 ms and each context switch costs 2 ms. What…
- Three users run the same 60 KB editor (pure, reentrant code) and each has 20 KB of private data. With paging that lets the code pages be…
- In a monitor with Mesa (signal-and-continue) semantics, why must a consumer write while (count == 0) wait(notEmpty); instead of if (count…
- In the first readers-writers solution (readers share a count; the first reader locks out writers and the last reader lets them in), what…
- Five philosophers each pick up their left fork and then their right fork. Which change removes the possibility of deadlock without adding…