Multilevel Paging in Operating System (original) (raw)

Last Updated : 6 Dec, 2025

Multilevel paging is a technique used in modern computer systems to efficiently handle large amounts of memory. It breaks down the virtual address space into smaller, more manageable pieces, organized into multiple levels of page tables. It consists of two or more levels of page tables in a hierarchical manner and also known as hierarchical paging.

Note: The entries of higher level of page table are pointers to lower level, entries of the last level page table store actual frame information. Level 1 contains a single-page table and the address of that table is stored in PTBR (Page Table Base Register).

Why Multi-Level Paging is Required

One solution to the large memory requirements of the page tables is to use multilevel paging, only the outermost page table will reside in the main memory and other page tables will be brought to the main memory as per the requirement because, at a particular time, we do not need complete page table,

**Note: In this way, we can save much memory space because outermost page table can fit in exactly one frame.

**Example: Consider a 32-bit physical address space with page size = 4KB and let there be 2^{20} = 1M, the total entries in the page table, page table entry size = 2^{32} /2^{12} = 2^{20}, and adding some protection bits and a dirty bit in the page table entry. Now page table size =2^{20} * 24 = 3MB which should be in the physical memory and since each process has its own page table there is so much memory wastage only for storing page tables.

Levels in Paging

Levels in Paging

**In multilevel **paging whatever may be levels of paging:

3-Level_Paging_System

3-Level Paging System

**Reference to actual page frame:

**Assumption: Byte addressable memory and n is the number of bits used to represent virtual address.

**Important formulas:

**Advantages :

**Disadvantages :

Example Problem

Consider a virtual memory system with physical memory of 8GB, a page size of 8KB, and a 46-bit virtual address. Assume every page table exactly fits into a single page. If page table entry size is 4B then how many levels of page tables would be required?

**Explanation:

Page size = 8KB = 213 B
Virtual address space size = 246 B
PTE = 4B = 22 B

Number of pages or number of entries in page table,
= (virtual address space size) / (page size)
= 246B/213 B
= 233

**Size of Page Table:

= (number of entries in page table)*(size of PTE)
= 233*22 B
= 235 B

**If page table size > desired size then create 1 more level. To create one more level:

**Size of Page Table > Page Size

Number of page tables in last level,
= 235 B / 213 B
= 222

multilevel_paging_2

Multilevel Paging