Loading the code workspace…
Write a C program that implements an LRU page cache for B-tree nodes.
Requirements:
PostgreSQL's shared_buffers and MySQL InnoDB's buffer pool are exactly this: an LRU-like cache standing between the B-tree and disk so a 1% miss rate doesn't turn every query into a disk seek. Getting eviction and dirty-page tracking right is why these caches use clock-sweep or LRU-K variants instead of naive LRU in production.