Mini Map

2Q

Two queues (simplified)

Teaching 2Q: first touch → A1in (FIFO); re-hit while resident → Am (LRU). Paper 2Q (Johnson & Shasha) also keeps an A1out ghost list and promotes on ghost hit, not only on a second in-cache touch.

IdleStep a query

Simplified 2Q: first touch → A1in (FIFO, max ~2). Resident re-hit → Am. (Paper 2Q also has A1out ghosts.)

hits 0 · misses 0 · Space / ← →

2Q Cache Replacement