For the implementation of a paging scheme, suppose the average process size be…
2014
For the implementation of a paging scheme, suppose the average process size be x bytes, the page size be y bytes, and each page entry requires z bytes. The optimum page size that minimizes the total overhead due to the page table and the internal fragmentation loss is given by
- A.
\(\frac x 2\) - B.
\(\frac {xz} 2\) - C.
\(\sqrt {2xz}\) - D.
\(\frac {\sqrt {xz}} 2\)
Attempted by 145 students.
Show answer & explanation
Correct answer: C
Goal: find the page size y that minimizes the total overhead due to the page table and average internal fragmentation.
Model and expressions:
Average number of pages per process ≈ x / y.
Page-table memory = (x / y) · z = xz / y.
Average internal fragmentation per process = y / 2.
Total overhead as a function of page size y:
T(y) = xz / y + y / 2
Minimize T(y) by differentiation:
dT/dy = -xz / y^2 + 1/2
Set derivative to zero: -xz / y^2 + 1/2 = 0 ⇒ 1/2 = xz / y^2
Solve for y: y^2 = 2 x z ⇒ y = √(2 x z)
Conclusion: the page size that minimizes the combined overhead is √(2 x z).
A video solution is available for this question — log in and enroll to watch it.