CS FundamentalsVery hardGATE CS · Advanced
A 32-bit machine uses two-level paging with 4 KB pages and 4-byte entries (10 bits for the top level, 10 for the second level, 12 for the offset), so every table is exactly one page. A process maps exactly these virtual regions: 3 MiB starting at 0x00000000; 6 MiB starting at 0x3FE00000; 4202496 bytes starting at 0x7FFFF000; and 2 MiB starting at 0xBFE00000. What is the minimum total size of its page tables?
- A. 32 KB
- B. 33 KB
- C. 28 KB
- D. 36 KB
Correct answer: A. 32 KB
One top-level table plus one second-level table for every distinct 4 MiB-aligned slice touched: slice numbers are [0, 255, 256, 511, 512, 513, 767], i.e. 7 tables. Regions that straddle a 4 MiB boundary need two second-level tables, and adjacent regions in one slice share one. Total (1 + 7) x 4 KB = 32 KB.
More Operating Systems questions
- A paged system has a 10 ns TLB lookup and 100 ns per memory access, with a 95% TLB hit ratio. A TLB miss costs a two-level page-table…
- A semaphore s is initialised to 0. Three threads run concurrently, and print(X) prints the single letter X atomically. Thread 1: print(A)…
- Two threads share an integer x initialised to 0. Thread 1 executes the loop body x = x + 1 three times; Thread 2 executes it twice. Each…
- Four periodic tasks (computation time C, period T = relative deadline), all released at t = 0, are scheduled by preemptive rate-monotonic…
- A disk spins at 7200 rpm with 500 sectors per track and an average seek time of 5 ms. The controller adds 0.2 ms of overhead. What is the…
- A stride scheduler gives processes A, B and C 100, 50 and 250 tickets respectively, with stride = 10000 / tickets. Every process starts…