In computer storage technology, a page is a fixed length block of memory that is used as a unit of transfer between physical memory and external storage like a disk, and a page fault is an interrupt (or exception) to the software raised by the hardware, when a program accesses a page that is mapped in address space, but not loaded in physical memory.
The hardware that detects this situation is the memory management unit in a processor. The exception handling software that handles the page fault is generally part of an operating system. The operating system tries to handle the page fault by making the required page accessible at a location in physical memory or kills the program in case it is an illegal access.
Some reasons for a page fault can inclulde:
- The page corresponding to the requested address is not loaded in memory.
- The page corresponding to the memory address accessed is loaded, but its present status is not updated in hardware.
- The page is not part of the program, and so is not mapped in program memory.
- The program does not have sufficient privileges to read or write the page.
- The page access is legal, but it is mapped with demand paging.
Related posts:
