472 views
0 votes
0 votes
Consider a system which has LAS = PAS = ‘s’ bytes, page size is p bytes,Page table entry size is ‘e’ bytes Memory is byte addressable. Then what is the optimal value of page size by minimizing the memory overhead of maintaining the page table and internal fragmentation in paging?

1 Answer

Best answer
1 votes
1 votes

In question you have LAS = PAS = ‘s’ bytes and your page size is ‘p’. So , the number of pages will be s/p . Now page table contain entries equal to number of pages so page table size will be (s*e)/p , that is number of entries multiplied by page table entry size. Now the internal fragmentation exists in last page and that internal fragmentation considered [p/2] , so overall equation we will get is

 

                                                                 memory overhead = P.T size + IF in paging

                                                                                               = (s*e)/p + p/2

 differentiate this equation w.r.t p , and make it equals to zero , that is -(s*e)/p^2 + ½ =0

and you can get optimal value, p = √2se

selected by

Related questions