A screen of code, representing a page fault.

What happens when needed data is not in memory.

What a page fault is

A page fault happens when a program tries to access a portion of memory that is not currently present in the computer's main memory. Systems that use virtual memory divide memory into chunks called pages, and not all pages are kept in physical memory at once. When a program needs a page that is not there, the processor raises a page fault to signal the situation.

Virtual memory and pages

Modern systems use virtual memory, which lets programs act as though they have a large, continuous memory space, while the system maps this onto the actual physical memory and storage. Memory is handled in units called pages. Because physical memory is limited, some pages may be kept elsewhere, such as on storage, rather than in main memory, and brought in when needed.

How the system responds

When a page fault occurs, the operating system steps in to handle it. If the needed page exists but is not in main memory, the system locates it and loads it into memory, then lets the program continue as if nothing happened. This process is largely invisible to the program, which simply experiences a brief pause while the required data is made available.

A normal part of operation

Page faults are often a normal and expected part of how virtual memory works, not necessarily errors. They are the mechanism by which the system brings in data on demand, loading pages only when they are actually needed. Many page faults are handled quickly and routinely. In this sense, a page fault is simply a signal that triggers the system to fetch the required page.

When faults affect performance

While individual page faults are normal, a very high rate of faults that require fetching data from slower storage can affect performance, since each fetch takes time. Systems are designed to keep frequently used pages in main memory to minimize this. Understanding page faults helps explain why memory management and having enough physical memory matter for a system's responsiveness.

Why it matters

The page fault is a key concept in how virtual memory works. Understanding what a page fault is - a signal that needed data is not in main memory and must be fetched - clarifies how systems manage limited memory. For anyone interested in how computers handle memory behind the scenes, it is a valuable concept to understand.

See also: What is virtual memory? Explained, What is memory paging? Explained.

Sources

Published date reflects the original event date (2025-04-08). This article is original Skillo editorial written from the sources above; facts were verified in September 2026.

Skillo Staff

Skillo Staff

All stories by: Skillo Staff

Leave a Reply