A
page fault (sometimes called
#PF or
PF) is a type of
interrupt, called
trap, raised by computer hardware when a running program accesses a
memory page that is mapped into the
virtual address space, but not actually loaded into
main memory. The hardware that detects a page fault is the processor's
memory management unit (MMU), while the
exception handling software that handles page faults is generally a part of the operating system
kernel. When handling a page fault, the
operating system generally tries to make the required page accessible at the location in physical memory, or terminates the program in case of an illegal memory access.