Course contentsShow
← Computer Science
Lesson 1344 of 2,87231. Memory ManagementFree lesson

Page Tables Introduction

Data structures maintained by the OS that map virtual pages to physical frames, enabling address translation.

Page Tables Introduction

What you'll learn: How the operating system uses page tables to translate virtual addresses into physical addresses in memory.


Now that you understand the role of the Memory Management Unit (MMU), it's time to see the key data structure that makes virtual memory work: page tables.

What is a Page Table?

A page table is a data structure maintained by the operating system that stores the mapping between virtual page numbers and physical frame numbers. Think of it as a lookup table or dictionary: you provide a virtual page number, and it tells you which physical frame in RAM holds that page's data.

Every process typically has its own page table, giving each process its own isolated view of memory. When your program accesses a virtual address, the MMU consults the process's page table to find where that data actually lives in physical memory.

The Basic Structure

At its simplest, a page table is like an array indexed by virtual page number:

Virtual Page 0  →  Physical Frame 7
Virtual Page 1  →  Physical Frame 3
Virtual Page 2  →  Physical Frame 15
Virtual Page 3  →  Not mapped (page fault!)

Each entry in the table (called a page table entry or PTE) contains the physical frame number along with additional metadata like permission bits and validity flags.

Why Page Tables Matter

Without page tables, the MMU couldn't perform address translation. They're the bridge between the virtual addresses your programs use and the actual physical memory locations. The OS manages these tables, updating them when pages are loaded, swapped, or deallocated.

Key Takeaway: Page tables are OS-maintained data structures that map virtual pages to physical frames, enabling the MMU to translate addresses and making virtual memory possible.