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)?

  1. A. 4096 bytes
  2. B. 1024 bytes
  3. C. 8192 bytes
  4. 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

Exams that ask this topic