Page Fault
PronunciationPAYJ fawlt
Definition
A page fault happens when a program touches a memory page that isn't currently mapped in RAM. The operating system then loads it, from disk (a major fault) or by just mapping it (a minor fault), and the program continues.
Where you hear it
In performance profiling, OS courses, and discussions about memory-mapped files and swapping.
Examples
Major page faults are slow because they read from disk.
A burst of page faults means the working set doesn't fit in RAM.
The first access to the big array triggers many page faults while the pages are loaded.
Common mistake
Treating every page fault as a bug. Minor faults are normal; only a flood of major faults signals trouble.
Don't confuse with
A segmentation fault, which is a crash from touching memory the program has no right to access.
Say it at work
- In a meeting or chat
How many major page faults per second?
- In an email or ticket
The machine is thrashing.
Keep exploring
More in Programming Fundamentals