344 views

2 Answers

Best answer
1 votes
1 votes

We try to find the optimum page size due to two factors.

  • Overhead due to page table entries.
  • Overhead due to internal fragmentation.

Now if  we go for,

  • Small page size:
    • Unused space due to internal fragmentation can be reduced. 
    • But this leads to process wanting more pages resulting in a larger page table.
  • Larger page size:
    • Efficient for IO
    • Smaller page table.
    • But increases the space wasted due to internal fragmentation.

To find an optimum page size we need to minimize the overhead due to page table entries and internal fragmentation.

  • If the process segment size is, S 
  • Page table entry size is, E bytes
  • And page size is, P
    • The average amount of internal fragmentation = P/2
    • Average number of pages per process segment = S/P
      • Each page required E bytes of the page table.
      • So page table size this process segment requires = ES/P
  • Total overhead due to internal fragmentation and page table size = ES/P + P/2
    • Now we need to minimize this.Differentiate this w.r.t page size P and equate to 0
      • => -SE/P2 + 1/2 = 0
      • => P = sqrt( 2*S*E )

 

Applying this here,

S = 32MB => 225

E = 4 B 

Now, P = sqrt ( 2* 225 * 22) = 214 = 16KB

selected by
0 votes
0 votes
Optimal Page size = sqrt(2*2^25*2^2), should be the answer.

Related questions

385
views
0 answers
0 votes
Gate Fever asked Nov 7, 2018
385 views
SHOULDN'T THE ANSWER BE 792??
329
views
2 answers
0 votes
Gate Fever asked Nov 7, 2018
329 views
462
views
0 answers
0 votes
Gate Fever asked Dec 9, 2018
462 views
consider a B+ tree in which search key is 15B long,block size is 2048B,record pointer size is 12B and block pointer size is 10B long.the maximum no. of keys that can be ... this approach-let no. of keys be x;15x+ 10(x+1)<= 2048 ;x=81
352
views
0 answers
0 votes
Gate Fever asked Dec 9, 2018
352 views
Which of the following query transformations (i.e., replacing the l.h.s. expression by the r.h.s expression) is correct? R1, R2 and R3 are relations, C1 and ... 3 and condition A2 as A2<8 whereas RHS gives me A11122hence option D is wrong?