microZEUS
The whole stack, hand-drawn.

◄ Wiki / OS

page fault

The interrupt that fires when a program touches memory that isn't currently mapped in.

When a program accesses a virtual address the MMU can't translate — because the page isn't loaded, doesn't exist, or is forbidden — the hardware raises a page fault and hands control to the OS. The OS then either fixes it (loading the page, growing the stack) or, for a genuinely invalid access, kills the program with a segfault. It's the pivot point of virtual-memory handling.

See also

  • page tableThe lookup structure the CPU uses to map a program's virtual addresses to real physical memory.
  • pagingThe virtual-memory scheme that splits memory into fixed-size chunks and maps them flexibly.
  • MMUThe hardware unit that translates the addresses a program uses into real physical memory locations.

Referenced by

mmap · MMU · mprotect · page table · paging · PC (program counter)