CS FundamentalsVery hardGATE CS (PYQ pattern)
A 32-bit machine uses two-level paging with 4 KB pages, 4-byte entries and 10 + 10 + 12 address bits, so each page-table page maps 4 MB. A process uses three regions: addresses 3 MB to 9 MB, 100 MB to 102 MB, and the topmost 3 MB of the address space. Page-table pages are allocated only when needed. How much memory (in KB) do the page tables of this process occupy?
- A. 20
- B. 24
- C. 28
- D. 32
Correct answer: B. 24
The L2 tables needed: 3-9 MB spans 4 MB-slots 0, 1, 2 (3 tables); 100-102 MB lies in slot 25 (1 table); the top 3 MB lies in the last slot (1 table). That is 5 L2 tables plus 1 root = 6 pages = 24 KB.
More Operating Systems questions
- Deadlock detection (multiple instances of 3 resource types) with 6 processes. Allocation: P0 (2,0,2), P1 (1,2,1), P2 (1,0,1), P3 (1,0,0)…
- Three processes all arrive at time 0 in the order A, B, C and are scheduled FCFS (non-preemptive on the CPU). Each alternates CPU burst…
- A 3-level feedback queue scheduler uses strict priority between levels. Level 0 has quantum 2 ms, level 1 has quantum 4 ms, level 2 is…
- Two processes i and j (j is the other one) use shared flag[2] (initially false) and turn to guard a critical section. Entry code of four…
- Arrays A and B are 128 x 128 int matrices stored row-major, 4-byte ints, 512-byte pages (each row occupies exactly one page, A and B…
- A Unix-like file system has 1 KB blocks, 4-byte pointers, and inodes with 10 direct pointers and one single-indirect pointer. Every…