Managing the VM Page Cache
Managing a VM page cache is similar to a file block cache, but with some new twists.
1. Pages are typically referenced by page table (pmap) entries.
Must pmap_page_protect to invalidate before reusing the frame.
2. Reads and writes are implicit; the TLB hides them from the OS.
How can we tell if a page is dirty?
How can we tell if a page is referenced?
3. Cache manager must run policies periodically, sampling page state.
Continuously push dirty pages to disk to “launder” them.
Continuously check references to judge how “hot” each page is.
Balance accuracy with sampling overhead.