Addressing Page Tables

Physical Page Tables: Set a predefined portion of physical ram for kernel page tables

Kernel Virtual Memory: Use page tables to store kernel page tables

Managing Swap Space

  1. Use a raw disk partition: Faster, require disk formatting to resize
  2. Use a file in fs: Slower, more flexible to resize

Virtual Memory Area

VMA: A description of each address space region (e.g. shared libraries)

MMap: Map a file to a memory region, synchronous read/write

Segfault: On page faults, check VMA first to verify if the address is valid

Ensuring Fairness

Space Fairness

Replacement

Sharing

Sharing pages: Put the same PTE in another process’ PT (with different permissions)

Copy on Write: Avoid copying as long as possible, create shared mapping instead