Abstract

A Page Table Entry (PTE) is a hardware-readable data structure that stores the physical mapping and operational status of a single virtual page. Flat, single-level linear page tables store an array of PTEs for every possible page in a process’s Virtual Address Space. While simple, linear page tables suffer from severe memory overhead in large address spaces, an issue that cannot be solved by Huge Pages alone.

  • Category: Address Translation Structures
  • Core Concept: Per-page metadata flags and address mapping.
  • Primary Deficit: Linear page tables scale linearly with address space size, causing massive RAM waste.

Per-Process Paging Architecture

When using paging, each process maintains its own independent page table:

Physical memory allocations are sourced directly from an OS-managed free list of fixed-size frames. Swapping pages to disk uses the page table’s metadata flags to track valid in-memory pages versus swapped-out pages.


Page Table Entry (PTE) Bit Structure

A Page Table Entry contains the physical location mapping along with operational control bits evaluated by MMU hardware on every memory access:

DirtyAccessValidProtectionPage Frame Number
MRVProtPFN / PPN
111320

Field / Bit NameSymbolDescription & Hardware Usage
Page Frame NumberPFN / PPNPhysical page frame number in RAM corresponding to the virtual page.
Valid BitVIndicates whether the page is loaded in physical RAM. If 0, an access triggers a Page Fault exception.
Modify BitM / DirtySet by hardware on a write operation. Indicates the page has been modified and must be flushed to disk before eviction.
Reference BitRSet by hardware on read or write. Used by OS page replacement algorithms to identify active pages.
Protection BitsProtDefines allowed access modes: Read, Write, Execute (R/W/X). Protecting Virtual Page 0 with no permissions catches null pointer dereferences (causing a segmentation fault).

Linear Page Table Memory Overhead

A linear page table assumes a flat array of PTEs indexed directly by the Virtual Page Number (VPN). The memory required to store a linear table scales with address space size:

32-Bit Address Space Calculation

  • Address Space: .
  • Page Size: Offset.
  • Virtual Page Number (VPN): .
  • PTE Size: .
  • Total Page Table Size:

    If processes are running simultaneously, the system wastes of physical RAM strictly for linear page tables.

64-Bit Address Space Calculation

  • Address Space: .
  • Page Size: Offset.
  • Virtual Page Number (VPN): .
  • PTE Size: .
  • Total Page Table Size:

Linear page tables are completely unviable for large or 64-bit address spaces.


Huge Pages & Trade-offs

One approach to reducing the total entry count is allocating Huge Pages (e.g., or pages instead of ):

graph TD
    Root["<b>Huge Pages</b>"]

    Root --> Phys["<b>Advantages</b><br/>• Reduces TLB cache misses<br/>• Decreases total PTE count in small ranges"]
    Root --> Virt["<b>Disadvantages</b><br/>• Severe Internal Fragmentation<br/>• Fails to fix 64-bit flat table size"]

Why Huge Pages Alone Do Not Solve Single-Level Table Size

Even with huge pages, a single-level flat page table in a 64-bit space requires absurd memory:

  • Pages (): Leaves for VPN .
  • Pages (): Leaves for VPN .

While huge pages improve Translation Lookaside Buffer (TLB) performance for memory-intensive applications, solving the page table memory size problem requires hierarchical indirection via Multi-Level Page Tables.