Paging maps a program’s virtual-memory pages to physical memory independently, allowing the operating system to rearrange, share, compress, or protect data without changing the program’s view. section 6.4.3
Paging supports several operating-system behaviors:
- Shares physical pages containing zeroes or already-loaded shared libraries between programs. section 6.4.3
- Adds protection attributes, such as making pages read-only or illegal to access. section 6.4.3
- Works with swapping and compression while preserving each program’s apparent memory. section 6.4.3
Designing for paging performance
Keep frequently used working data within roughly 4 KB when practical, avoid pointer-heavy structures that cross pages, and test loop ordering over arrays. These choices help the translation lookaside buffer and cache lines work effectively. section 6.4.3
