The Cache
Cache is divided into page-sized slots.
Each slot’s dirty bit tells if the page was updated since it was last written to disk.
Pin count tells number of pin ops without unpins
- Fetch(P) - read P into a cache slot. Return slot address.
- Flush(P) - If P’s slot is dirty and unpinned, then write it to disk (i.e. return after the disk acks)
- Pin(P) - make P’s slot unflushable. Unpin releases it.
- Deallocate - allow P’s slot to be reused (even if dirty)