page fault
also: soft fault, hard fault, minor fault, major fault
A page fault occurs when a program tries to access memory that is not currently loaded in physical RAM, forcing the kernel to fetch it from disk or allocate it. It's a normal performance mechanism, not necessarily an error.
A page fault happens when a CPU tries to access a virtual memory address whose corresponding data isn't present in physical RAM. The kernel's memory management unit (MMU) detects this and triggers an interrupt, pausing the program while the kernel loads the required page from disk (swap) or allocates fresh memory.
There are two main types: a minor page fault (soft fault) retrieves a page already in memory but not yet mapped to the process, while a major page fault (hard fault) must read from slow disk storage, causing noticeable delays.
For example, when you run a large program, only frequently-used portions stay in RAM. If your code jumps to an unused function, that triggers a major page fault—the kernel loads those instructions from disk before execution continues. Excessive page faults indicate memory pressure and can severely degrade performance.