Virtual Address Translation and Page Permissions
Split a virtual address into page number and offset, then use a mapping to recover a physical address subject to access permissions.
- Source
- Anbloq
- Language
- English
- Created
- Updated
- Chapters
- 2
- Reading time
- 1 min
In this article2 chapters
A translation preserves the within-page offset
For a 4 KiB page, the lower twelve address bits give the byte offset. In a simple model, the page-table entry for the upper virtual page number gives a frame number plus validity and permissions. If virtual page five maps to physical frame eighty, offset twelve maps to \(80\cdot4096+12=327692\). The same virtual page number in another process can select another frame.
Access rights are checked as part of the translation
A valid mapping may allow read but forbid write or execution. An invalid or unsuitable entry can raise a fault rather than produce a usable access. A fault handler distinguishes recoverable events from an illegal access. Multilevel page tables organize sparse mappings. Demand paging explains how some faults populate a mapping that was intentionally absent.[1][2]