1,816 views
2 votes
2 votes

Given that the logical address is "d" bits.Page table entry size is 4 Bytes, what must be the optimal page size P by minimizing the page table size overhead and internal fragmentation in paging?

a) √4d

b) (4d)2

c) √8.22d

d) √2d+3 

1 Answer

Best answer
10 votes
10 votes

Given logical address size = d bits

Therefore , logical address space = 2d bytes( assuming that it is byte addressable memory meaning word size = 1 Byte)

Let the page size   =   p

So , no of pages    =   Logical address space / Page size 

                            =   2d / p

Now we know that ,

No of page table entries  =   No of pages in single level paging

                                    =    2d / p

Therefore the memory required for page table which is considered as the overhead

in the question :             =   No of page table entries  *  Page table entry size

                                    =   (2d / p)  *  4 B

                                    =    2d+2 / p

We know that internal fragmentation in the paging if exists can occur only in the last page and hence internal fragmentation varies from  0  to  p , where p is the page size .

So as an average , internal fragmentation   =  (0 + p) / 2             

                                                              =   p / 2

Hence the total overhead    =    Overhead due to page table + Internal fragmentation

                                        =     2d+2 / p   +  p / 2      =    f(p) say

Now as a function to minimise this ,

d (f(p)) / dp   =    0

⇒  -2d+2 / p2  +  1/2    = 0

⇒  p2  =   2d+3

⇒  p   =    √ 2d+3

Further , for minimum ,

d2 (f(p)) / dp2   > 0 which can be verified easily by applying this on f(p).

So  optimal page size which is required  =  √ 2d+3  B    

Hence D is the correct option.

selected by

Related questions

0 votes
0 votes
0 answers
1
SSR17 asked Feb 8
208 views
we have 8 pages (each side 32B) to store in physical memory of 2^32 bits how many bits are required to identify each page , according to me 3 bits are required but that i...
0 votes
0 votes
2 answers
4
Unique_999 asked Aug 17, 2023
320 views
Can Any explain the relationship between The “ Word Size “ and “ Logical Address Space “