liveBook · Manning

Memory paging

As explained in Rust in Action: Systems programming concepts and techniques

Paging is a memory-management technique that divides virtual memory into fixed-size pages and moves or maps those pages independently.

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

How Rust in Action: Systems programming concepts and techniques covers it

How deep it goes
Explains operating-system effects and practical locality guidelines, but does not detail page-table structures or translation algorithms.
Examples
Uses shared zero pages, shared libraries, read-only pages, 4 KB working sets, pointer structures, and array loop ordering.
What you can do after
Apply it by organizing data and access patterns to reduce page and translation-cache costs.
How it connects
Connects paging with virtual memory, physical memory, swapping, shared libraries, page protection, TLBs, cache lines, and virtualization.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Rust in Action: Systems programming concepts and techniques. The section links point to the parts of the book it draws on.