@adarsh_1997 explain please

Dark Mode

642 views

0 votes

My approach was:

Assuming Optimal page size be x.

Total number of pages =$\frac{32 * 2^{20}}{x}$

No fo pages *Size of each entry of page = Page table size

**we have to fit entire page table in one page**

**=>**$\frac{32 * 2^{20}}{x} * 4 = x$

=>$x^2 = 2^{27}$

=>$x=(134217728)^{1/2} $

=>$x=11585.2375$Bytes

=>$x=11.31KB$

=>$x=12KB$

Please correct me.. where I went wrong.

0

2 votes

Best answer

1 vote

Given, Process size =32 MB = 2^25 B

PTE= 4 B = 2^2 B.

For minimizing total overload due to page table and internal fragmentation

Page size >= Page table size.

Let page size be p

We know that, Page table size= no. Of pages * PTE

So, p >= (2^25)/p * 2^2 B

p^2 >= 2^27 B

p >= 2^(27/2) B

So, p min will be 2^14 B = 16 KB

PTE= 4 B = 2^2 B.

For minimizing total overload due to page table and internal fragmentation

Page size >= Page table size.

Let page size be p

We know that, Page table size= no. Of pages * PTE

So, p >= (2^25)/p * 2^2 B

p^2 >= 2^27 B

p >= 2^(27/2) B

So, p min will be 2^14 B = 16 KB