Page fault

from Wikipedia, the free encyclopedia

A page fault ( Engl. Page fault ) occurs in operating systems with virtual memory management and paging when a program accesses a memory area that is not currently in main memory is, but for example on the hard drive has been swapped out or if to the relevant address currently no description entry is available in the MMU . The immediate consequence of the page fault is a synchronous exception (fault). The operating system now ensures that the requested memory area is reloaded into the main memory or that the missing MMU entry is reloaded so that the program can access it. A page fault is therefore not a fault in the strict sense of the word. The user does not feel anything from this process, at most a slowdown of the program that caused the page fault, since loading the page or editing the process takes a short moment. Other programs or processes are not affected.

The page fault is not to be confused with the segmentation fault , which is a protection violation when accessing non-existent or protected memory areas.

Soft Page Fault

The soft page fault behaves similarly to the page fault and occurs in the following cases:

  • The process tries to write to the page, the read only bit in the PTE of the MMU and the copy-on-write bit in the memory management of the operating system for this page are set.
  • The page is in memory, but does not belong to the working set of the process. B. Part of the Free page list .
  • The process requests a new blank page.

See also