FREE LESSON · Operating systems & runtimes · 2 OF 4

How Virtual Memory Works: Page Tables and Faults

Virtual memory is controlled indirection — Isolation, translation, paging, and faults

A virtual address is a process-relative name.

Page tables map virtual pages to physical frames with permissions and status. A translation lookaside buffer caches recent mappings. A missing or disallowed mapping triggers a page fault so the kernel can reject access, create a page, load data, or update a copy-on-write mapping.

Virtual memory separates the address a program uses from where bytes currently live.

Copy-on-write makes duplication conditional

After a process fork, parent and child can initially share read-only mappings to the same frames. When either writes, a protection fault lets the kernel allocate and copy only that page, then grant the writer a private mapping. Unmodified pages never pay the copy cost.

Indirection creates a place to defer work until evidence says it is necessary.
Open this lesson in the interactive course →