CS FundamentalsModerateGATE CS (PYQ pattern)
A process has a 1 MB address space split into 4 segments, each paged separately; the single-level page tables together need one 8-byte entry per page of the 1 MB, and each segment wastes on average half a page to internal fragmentation. Among the page sizes 1024, 2048, 4096 and 8192 bytes, which minimises (total page-table size + total internal fragmentation)?
- A. 4096 bytes
- B. 1024 bytes
- C. 8192 bytes
- D. 2048 bytes
Correct answer: D. 2048 bytes
Overhead(p) = (2^20 / p) x 8 + 4 x p / 2. p = 1024: 8192 + 2048 = 10240; p = 2048: 4096 + 4096 = 8192; p = 4096: 2048 + 8192 = 10240; p = 8192: 1024 + 16384 = 17408. The minimum is at 2048 = sqrt(2 x 2^20 x 8 / 4). Forgetting that there are 4 fragmented segments gives the textbook sqrt(2se) = 4096.
More Operating Systems questions
- A process owns 100 private writable pages. It calls fork() and both processes use copy-on-write. Before either exits, the child writes to…
- A RAID 5 array has 6 disks, each able to do 150 random I/O operations per second. A small RAID 5 write costs 4 disk I/Os (read old data…
- A 512 x 512 matrix of 4-byte integers is stored row-major, starting at a page boundary, with 4 KB pages (so two rows per page). The code…
- With 3 frames, initially empty, the reference string is 4, 2, 1, 5, 2, 1, 3, 2, 4, 3, 1, 3, 2, 2, 5, 4, 5, 1, 3, 2, 4, 4. How many MORE…
- 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…
- 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)…