Demand Paging and Recoverable Page Faults
Follow a fault that brings a valid page into memory and distinguish backing-store work from a simple protection decision.
- Source
- Anbloq
- Language
- English
- Created
- Updated
- Chapters
- 2
- Reading time
- 1 min
In this article2 chapters
A mapping can be valid in principle but absent in memory
An address region can permit access even when no resident frame holds a page yet. A fault first asks whether the virtual region and operation are legal. A first access to anonymous memory may receive a zero-filled page. A file-backed region may need a page from the file or its cache. After installing the mapping, the kernel can restart a suitable faulting instruction under its architecture’s rules.
The delay depends on what needs to be recovered
If the required page is already cached, supplying a translation can avoid storage I/O. If it must be read from storage, the fault may block noticeably longer. To make room, page replacement may reclaim a clean page or arrange to write dirty contents first. Copy-on-write uses a recoverable fault for a different reason: the current page exists but is not yet privately writable.[1]