Multilevel paging

Multilevel paging:

Multilevel paging  is a paging scheme where there exists a hierarchy of page tables

The need for Multilevel paging

  • To avoid the overhead of bringing large size page table in to memory ,the multilevel paging will be implemented
  • In the multilevel paging ,paging will be applied on the page tables and instead of bringing the entire page tables in to memory ,the pages of page table will be brought in to  main memory

Two level page table diagram

p1 \rightarrow no. of bits required to represents the pages of page table (outer page table) or page no. of page table

p2\rightarrow no. of bits required to represents the  page sige of page table or word number of the page of  page table  or page offset of page table 

Three level page table diagram:

 

 

Important Points :

  1. In the multilevel paging  when the paging applied on the page table,the last  page table which we get is called as First level page table.
  2.  In the multilevel paging  when the paging applied on the page table, the  first level page table  entry contains base address of second level page table, second level page table entry contains the base address of third level page table and so on. The final page table entry contains frame number of actual page
  3.  In the multilevel paging  when the paging applied on the page tables,then whatever may be the levels of paging all the page table (page of page tables )will be stored in the main memory.
  4. In the multilevel paging  when the paging applied on the page table,then whatever may be the levels of paging all the page table entries contains the frame number
  5. If page size is not mentioned in the problem then generally page size will be same  in all the places(levels)

 Ques. A computer has a 32 bit virtual address space and 1024 Bytes pages.A page table entry is 4 bytes.A multilevel page table is used because each page must fit in a page.How many levels are required ?

solution:

 given data  page size=1024 bytes

               virtual address =32 bit

           page table entry size=4 bytes

      

Page table size=(LAS/page size)*page table entry size

PTS1=(232/1024)*4B=224 cannot fit in a sngle page

 

PTS2=(224/1024)*4B = 216  cannot fit in a single page

 

PTS3=(216/1024)*4B=2 can be fit in a single page 

   

 

therefore 3 levels are required to fit in a single page 

 

 

 

 

Contributor's Info

Created:
0Comment