What is Page fault?
An exception raised when an accessed page is not mapped to physical memory or the access type is not permitted. The OS either supplies the page and retries the instruction or treats it as an illegal access.
Field: OS & Hardware
An exception raised when an accessed page is not mapped to physical memory or the access type is not permitted. The OS either supplies the page and retries the instruction or treats it as an illegal access.
Field: OS & Hardware
A page fault is an exception raised when the accessed page's page-table entry is invalid, meaning it is not mapped to physical memory (it was paged out or never loaded), or when the access is not permitted, such as writing a read-only page.
When does a page fault occur?For a page fault from a legitimate access, the OS finds a free physical page (evicting another if needed), reads the contents from disk and marks the page-table entry valid.
When a page fault occurs on a page that was evicted to disk…When too-deep recursion pushes the stack into that page, a page fault occurs and the OS stops the program (a segmentation fault).
When recursion goes so deep that it exceeds the stack limit…Demand paging TLB (translation lookaside buffer) Copy-on-write System call Non-uniform memory access (NUMA) ASID Context switch Device driver Hypervisor Interrupt handler