The model
Virtual memory lets each process use an address space that is translated through page tables and hardware translation caches. Pages provide the unit for mapping, protection, and often movement between RAM and storage. This abstraction supports isolation and flexible placement, but translations and misses have real costs.
A concrete walk-through
On a memory access, the processor first uses a translation lookaside buffer when possible. If translation is absent, hardware or the kernel walks page tables. If the mapping is valid but not resident, a page fault transfers control to the kernel, which may allocate a page, load data, or reject an invalid access.
Costs and failure cases
A page fault is not always an error: demand-zero allocation and copy-on-write can be handled transparently. A major fault that requires storage I/O is much slower than a minor fault resolved without disk access. Poor locality can cause repeated faults and thrashing.
Check your understanding
After a process forks, explain why the parent and child may initially share physical pages yet observe independent writes. Identify the fault mechanism that enables this behavior.