CS FundamentalsVery hardGATE CS (PYQ pattern)
A process on a 4-level, 48-bit paging system (9 index bits per level, 4 KB pages, 4 KB page-table pages) maps three regions: 2 MB at 0x400000, 6 MB at 0x10000000 and a 1 MB stack ending at 0x800000000000. Page-table pages exist only where needed. How many page-table pages (all four levels, including the root) does the process use?
- A. 8
- B. 12
- C. 14
- D. 10
Correct answer: D. 10
Count distinct nodes per level: 1 root; level-3 nodes covering 512 GB slots; level-2 nodes covering 1 GB; level-1 (leaf) tables covering 2 MB. The regions need 10 pages in total.
More Operating Systems questions
- On a 4-level x86-64 style paging system (4 KB table pages, 512 eight-byte entries each, 2 MB pages are leaves at the third level), a…
- Polling a device costs a fixed 10% of the CPU (100,000 polls/s at 1 microsecond each) plus 0.5 microseconds of handling per event…
- In Lamport's bakery algorithm five processes P0 to P4 hold tickets (number, id): P0 has 4, P1 has 3, P2 has 4, P3 is not competing (0) and…
- A 200 KB heap is managed with a first-fit free list; adjacent free blocks are merged when memory is freed. Operations in order: alloc…
- A fixed-size job runs 6 times faster on 8 cores than on 1 core. Assuming Amdahl's law holds exactly (a serial fraction f, the rest…
- Three philosophers sit at a table with three forks; philosopher i always picks up fork i (left) first and then fork (i+1) mod 3 (right)…