> For the complete documentation index, see [llms.txt](https://xiayingp.gitbook.io/build_a_os/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://xiayingp.gitbook.io/build_a_os/virtual-memory/page-table/part-4-page-fault-and-swap.md).

# Part 4: Page Fault and Swap

Page can store in disk, if memory is running out of space. Page Table will have bit indicate page is valid but not present. When reference a not in memory page, the handler will generate a page fault. Memory and disk can swap pages whenever needed.
