One - level page tables for virtual to physical address translation - Operating System

Q.  Consider a system with 32 bit virtual addresses and 1 kbyte page size. Why is it not possible to use one - level page tables for virtual to physical address translation?
- Published on 27 Aug 15

a. The amount of external fragmentation
b. The amount of internal fragmentation
c. The large computation overhead in the translation process
d. The large memory overhead in maintaining page tables

ANSWER: The large memory overhead in maintaining page tables
 

    Discussion

  • Senam    -Posted on 08 Jan 19
    What is the meaning of one level table?
    And why u assume physical memory 512mb?
  • Nirja Shah   -Posted on 18 Nov 15
    - Since the size of the page is too small it will make the size of the page tables huge.

    - Size of page table = (total number of page table entries)∗(size of a page table entry)

    - Consider an example of the number of entries in the page table

    Number of entries in page table = (virtual address space size)/(page size)
    = (2^32)/(2^10)
    = 2^22

    - Let us check how big each entry is.

    - If the size of physical memory is 512 MB then the number of bits that are required to address a byte in 512 MB is 29.

    - So, there will be (512MB)/(1KB) = (2^29)/(2^10) page frames in physical memory.

    - 19 bits are required to address a page frame.

    - Therefore, every entry in the page table requires to have 19 bits.

    - The page table entry also holds the auxiliary information about the page such as the present bit, a dirty or modified bit, address space or process ID information and many others.

    - Hence,the size of the page table is
    (total number of page table entries)∗(size of a page table entry)
    (2^22 ∗19) bytes
    9.5 MB

    - This much of the memory is required for each process because each process maintains its own page table.

    - Size of the page table will be more for physical memory more than 512MB.

    - Therefore, it is advised to use multilevel page table for such scenarios.

Post your comment / Share knowledge


Enter the code shown above:
 
(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)