Structure of a Page Table Entry (PTE)

Tanenbaum Section 3.3.1 (Fig. 3-11): Conceptual grounding, hardware bit dissection, and live MMU fault sandbox.

What is a Page Table Entry?

Virtual memory relies on a contract between hardware (the Memory Management Unit, or MMU) and the operating system kernel. When a process issues a virtual memory address, the hardware extracts the high-order bits representing the Virtual Page Number (VPN) and uses them as an array index into the process's page table.

Each slot in that array is a single Page Table Entry (PTE). In modern 64-bit systems, each PTE is typically an 8-byte (64-bit) data structure. Its job is twofold:

  • Provide Physical Translation: Map the virtual page to its current physical frame in DRAM via the Page Frame Number (PFN).
  • Store Hardware Control Flags: Convey permissions, memory residency, and access history via status bits inspected directly by hardware on every instruction fetch, read, or write.
Physical Address = (Page Frame Number << Page_Shift) | In_Page_Offset

Because physical DRAM is partitioned into fixed 4 KB (212-byte) boundaries, the low 12 bits of any address are identical in both virtual and physical memory. This leaves the lowest bits of the PTE free to store critical control flags rather than redundant address bits.

Textbook Diagram: Figure 3-11
Page frame number Caching disabled Referenced Modified Protection Supervisor Present/absent Figure 3-11. A typical page table entry.
Part 1: Step 1 of 6 Guided Tutorial
1. The 64-Bit Entry & Page Frame Number (PFN)
Page Frame Number (PFN) Bits 63..12 (PFN 0x00041)
Supervisor 0
Caching 0
Modified 0
Referenced 0
Protection 1
Present 1

Part 2: Interactive Sandbox & MMU Tester

Click on any flag bit in the PTE below to toggle it manually, then issue read/write requests to watch the MMU react in real time.

Page Frame Number (PFN) Bits 63..12 (PFN 0x00041)
Supervisor 0
Caching 0
Modified 1
Referenced 1
Protection 1
Present 1
Simulate CPU Instruction:
Bit Definitions (Tanenbaum Sec 3.3.1)
BitFull NameRole in Hardware MMU
PresentPresent / Absent1 = Frame in DRAM. 0 = On disk; access triggers a Page Fault.
ProtectionProtection0 = Read-only. 1 = Read & Write allowed.
ReferencedReferencedHardware sets to 1 on read/write. Cleared by OS clock ticks.
ModifiedModified (Dirty)Hardware sets to 1 on write. If 1, page must be saved to disk on eviction.
CachingCaching Disabled1 = Bypasses CPU L1/L2 caches; used for memory-mapped I/O registers.
SupervisorUser / Supervisor0 = Userland accessible. 1 = Kernel/Supervisor mode only.
Hardware MMU Execution Log Real-time reaction