Skip to content

Page Fault

A memory-access exception that lets the operating system resolve an absent or disallowed virtual-memory mapping.

Version
v1 · 2026-10-03 · History
Domain-specific #
13486
Domain group
Applied Sciences & Engineering
Origin domain
Computer Science & Software Engineering
Aliases
Page Fault

Core Idea

A page fault is an exception raised when a memory access cannot proceed under the current virtual-memory translation or permissions. The operating system's handler inspects the cause. It may bring in a page, establish a mapping, make a private copy on write, or reject the access. Only a successfully handled fault allows the instruction to resume; the event itself is not necessarily an application error.[1][2]

Hardware detects the presently unusable translation; the operating system determines whether the access is valid and what disposition follows. A fault can therefore be an ordinary part of demand paging or copy-on-write, or it can reveal an access that policy forbids.

How would you explain it like I'm…

The Memory Map Hiccup

A computer keeps a map that says where each piece of a program's memory really lives. Sometimes the program reaches for a piece and the map says "not set up here yet" or "you're not allowed." That stop is a page fault. Then the computer's boss program looks and decides: fetch it, set it up, make a copy, or say no.

Missing Page Alarm

Programs use pretend addresses for memory, and the computer keeps a map from those pretend addresses to the real memory chips. A page fault happens when the program reaches for an address that the map can't handle right now, or isn't allowed to touch that way. The chip notices and hands the problem to the operating system. The operating system might fetch the missing piece, set up the map, make a private copy, or refuse. A page fault is not automatically a mistake by the program.

Virtual Memory Exception

Computers use virtual memory: each program sees its own addresses, which are translated into physical memory in chunks called pages. A page fault is the exception raised when an access can't go through the current translation or its permissions. The hardware only detects that the access can't finish; the operating system decides what it means. Often the address is perfectly legal but not ready yet — the page hasn't been allocated, has to be loaded from disk, or is shared and must be copied before writing. Sometimes the access really is illegal and gets rejected. Only when the handler fixes things does the instruction run again.

 

A page fault is an exception raised when a memory access cannot complete under the current virtual-to-physical translation or its permissions. The key split is between hardware detection and operating-system disposition. The fault itself says only that the presently installed mapping can't serve this access; it doesn't say whether the address is illegal or just not ready. The OS handler distinguishes cases: a valid region whose physical page hasn't been allocated yet, a page whose contents must be read from backing storage, a shared page that must be copied on write before it can be modified, or an access outside any permitted region, which is rejected. If handled, the faulting instruction is restarted. Reading raw fault counts without separating these branches hides both performance behavior and correctness problems.

Scope of Application

This description applies to paged virtual-memory systems, with Linux as the directly sourced implementation. Hardware architectures and operating systems differ in page-table format and exact handler paths. The recurring relation is access → exception → decision → possible retry.

The historical Linux account supplies the worked branches, while current kernel API documentation still distinguishes major storage reads, retry, completed copy-on-write, and error outcomes. Historical function names should not be projected onto every current kernel.[2][3]

Clarity

Separating detection from resolution explains why the same exception channel can support ordinary demand paging and also expose illegal access. A process may never notice a recoverable fault except through timing; an unrecoverable one becomes visible.

The same file-backed read may be minor if a page is resident and merely needs mapping, or major if the page must be fetched from storage. Moving the address outside a valid virtual region changes the question: there is no permitted page to install simply because the instruction requested one.[2]

Manages Complexity

One exception mechanism postpones allocation, file loading, and copying until an access demands them. This avoids doing all work in advance, but it also makes memory latency and page-fault counts dependent on program behavior and storage state.

Region permission, page-table state, and backing state are separate layers. A count of faults should therefore be broken into minor demand work, major storage work, COW repairs, and rejected accesses before it is treated as either a performance symptom or an error count.

Abstract Reasoning

At an attempted access, ask whether the virtual address maps to a usable page with the required permission. If not, classify the cause under the OS's rules. A resident page may only need a mapping; a file-backed nonresident page may require I/O; a write to shared copy-on-write memory may require a private copy; an invalid address cannot be repaired as an ordinary demand fault.[2]

First check whether a virtual region exists and allows the access. Then ask whether the page can be allocated, remapped from resident memory, read from storage, or copied privately. A write to a read-only page-table entry inside a writable COW region is repairable; a write to a genuinely nonwritable region is not. Retry and error are distinct handler outcomes, not versions of the same success.[2][3]

Knowledge Transfer

The demand-triggered intervention pattern can illuminate other lazy systems, but “page fault” remains a virtual-memory term. Calling a cache miss or network retry a page fault imports a metaphor and loses the memory-protection context.

The diagnostic frame transfers literally among anonymous demand allocation, file-backed paging, and COW because each is mediated by virtual-region rights and page translation. Other lazy systems share only the broader guarded-repair analogy; the named identity stays in paged memory.

Relationships to Other Abstractions

Local relationship map for Page FaultParents appear above the current abstraction, mutual partners to the right, and children below. Node labels state whether each abstraction is prime or domain-specific; colors identify relation types.Page FaultDOMAINDomain-specific abstraction: Virtual memory — presupposesVirtual memoryDOMAIN

Current abstraction Page Fault Domain-specific

Parents (1) — outgoing typed relations

  • Page Fault presupposes Virtual memory Domain-specific

    A page fault presupposes virtual-memory translation or protection state.

Hierarchy paths (3) — routes to 3 parentless roots

Neighborhood in Abstraction Space

Page Fault sits in a sparse region of the domain-specific corpus (60th percentile for distinctiveness): few abstractions share its structure, so a faithful description tends to retrieve it precisely.

Family — Network Security Vulnerabilities & Trust (32 abstractions)

Nearest neighbors

Computed from structural-signature embeddings · 2026-11-14

References

[1] Linux kernel page-table documentation, page-table hierarchy and architecture-dependent mappings. registry ↩

[2] Mel Gorman, Linux virtual-memory account hosted by kernel.org, historical Linux implementation, especially §§4.4–4.6 and Table 4.4. registry ↩a ↩b ↩c ↩d ↩e

[3] Linux memory-management API documentation, fault result categories. registry ↩a ↩b