CS FundamentalsModerateGATE CS (PYQ pattern)
A system has 48-bit virtual addresses, 8 KB pages and 2^40 bytes of physical memory. Each page-table entry holds a frame number plus 5 control bits and is rounded up to a whole number of bytes. Each page-table node must fit in a single page. What is the minimum number of page-table levels?
- A. 4
- B. 3
- C. 5
- D. 6
Correct answer: A. 4
Frame number = 40 - 13 = 27 bits; +5 = 32 bits = 4 bytes. A page holds 8192 / 4 = 2048 entries = 11 index bits per level. 48 - 13 = 35 translated bits need ceil(35 / 11) = 4 levels.
More Operating Systems questions
- A 7200 RPM disk has 500 sectors of 512 bytes per track and an average seek of 8 ms. A 1,048,576-byte file is stored in consecutive sectors…
- A program loops over pages 1, 2, 3, 4, 5 six times in cyclic order (30 references) with 4 frames, initially empty. How many page faults…
- SJF predicts each process's next CPU burst by exponential averaging, tau(n+1) = a x t(n) + (1 - a) x tau(n), with a = 0.5 and tau(0) = 10…
- Assume every fork() succeeds. for (int i = 0; i < 4; i++) { if (fork() == 0 && i % 2 == 1) execl("/bin/true", "true", NULL); }…
- A machine with 4 KB pages and demand paging has a 6-byte memory-to-memory MOVE instruction stored at virtual address 0x0FFC. It copies 300…
- Six threads each take two locks in a fixed order and hold the first while acquiring the second: T1 takes A then B, T2: B then C, T3: C…