High-performance cache policies and supporting data structures.
Spec maturity: stub
Executable oracle:
tests/abstract_models/exact/clock.rs(ClockModel) — mirrorsClockRinguntil an independentreference/model exists.
Clock (second-chance): circular buffer with reference bits; evict first unreferenced slot on the clock hand.
| Variable | Type | Meaning |
|---|---|---|
ring |
ClockRing<K,V> |
Circular slots with reference bits |
hand |
index | Clock sweep position |
C.| Observable | Definition |
|---|---|
resident |
Keys present in ring slots |
peek_victim |
First unreferenced slot from hand (second-chance sweep) |
hit |
MustHit / MustMiss |
Insert(k)Get(k) / Peek(k)Get: set reference bit on hit. Peek: no bit change.EvictOneClockRing DS.ClockCache vs ClockRing residency in dual_impl_tests.rs.ClockCache