You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Adversarial Hand Starvation ("Zombie Pinning") in SIEVE (Sieve.c): 0% vs 100% Belady Anomaly for all 3 ≤ k < C and O(1) Mitigations
#389
While studying worst-case Belady anomalies across modern eviction policies (SIEVE, S3-FIFO, CLOCK, CLOCK-2bit, Second-Chance, FIFO), we found a deterministic structural failure mode in SIEVE where the eviction hand can be permanently locked near q_head without ever wrapping back to q_tail.
We audited our simulator line-by-line against libCacheSim at commit 4b66d97 (Sieve.c: Sieve_find L126–134, Sieve_insert L147–154, Sieve_evict L219–245; cache.c L321–326) and confirmed 1:1 semantic conformance for SIEVE, as well as checking exact S3FIFO.c / S3FIFOv0.c semantics.
Summary of Findings
Unbounded Belady Anomaly / "Zombie Pinning" in SIEVE (all $3 \le k < C$):
With a prefix of length 2C - 2 followed by a 3-key cycle [D, A, B], SIEVE(k) settles at a 0% steady-state miss rate, while SIEVE(C) is trapped at a 100% steady-state miss rate with C - 2 unvisited "zombie" objects pinned indefinitely.
Cross-verified with independent Python and Go DLL implementations across all 378 pairs ($3 \le k < C \le 30$) and extreme scales up to (3, 1000) and (500, 1000).
Sharp Phase Transition & Structural Separation:
At $k = 2$, a 0% vs >0% steady-state anomaly is impossible on SIEVE (exact state-graph max ratio 3/2 at (2, 3) and 4/3 at (2, 4)).
Across FIFO, CLOCK, CLOCK-2bit, Second-Chance, and S3-FIFO (confirmed under exact S3FIFO.c semantics as well), a 0% vs >0% anomaly is structurally impossible. However, S3-FIFO exhibits periodic finite Belady spikes at multiple-of-10 capacity boundaries where Small grows while Main stays fixed (up to 2.27x in the SOSP '23 narrative model and 1.70x at (39, 40) under exact S3FIFO.c).
Persistence Under Mixed Traffic:
Under 1% Zipf background noise (C = 100, 200), SIEVE stayed pinned for all 50,000 requests (100% miss rate vs <1% for CLOCK/S3-FIFO/LRU).
Background hits exclusively targeting pinned zombie keys (25% traffic) never unlock hand (time-to-unwrap = ∞, 74.9% miss rate).
O(1) Single-Counter Mitigations (SIEVE-TP vs SIEVE-BW):
Naive bounded forced-wrap (SIEVE-BW(C/2C)) cures pinning but degrades normal Zipf/Scan miss ratio (avg Δ = +0.0494 to +0.0727) by sweeping hot objects near q_tail—highlighting a direct tradeoff between quick demotion and hand starvation.
A periodic single-node tail probe (SIEVE-TP) reduces Zipf/Scan regression by up to 3.9x at fast recovery intervals (C..4C) and breaks zombie_hits_only (p=25%, C=100) in 116 requests (0.42% miss). At loose intervals (16C), SIEVE-BW(16C) even slightly improved mean Zipf/Scan miss ratio (avg Δ = -0.0040) while bounding worst-case recovery.
Reproducible Artifact
All code, conformance audit (results/libcachesim_conformance.md), witnesses, figures, and a draft write-up are available here:
Everything can be reproduced locally in ~20 seconds via python reproduce.py --quick (Python 3 + Go, CI-verified).
Has this hand-starvation / zombie-pinning behavior in SIEVE been observed or documented previously? Any feedback on edge cases or libCacheSim implementation nuances would be greatly appreciated.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Hi all,
While studying worst-case Belady anomalies across modern eviction policies (
SIEVE,S3-FIFO,CLOCK,CLOCK-2bit,Second-Chance,FIFO), we found a deterministic structural failure mode in SIEVE where the evictionhandcan be permanently locked nearq_headwithout ever wrapping back toq_tail.We audited our simulator line-by-line against
libCacheSimat commit4b66d97(Sieve.c:Sieve_findL126–134,Sieve_insertL147–154,Sieve_evictL219–245;cache.cL321–326) and confirmed 1:1 semantic conformance for SIEVE, as well as checking exactS3FIFO.c/S3FIFOv0.csemantics.Summary of Findings
Unbounded Belady Anomaly / "Zombie Pinning" in SIEVE (all$3 \le k < C$ ):
2C - 2followed by a 3-key cycle[D, A, B],SIEVE(k)settles at a 0% steady-state miss rate, whileSIEVE(C)is trapped at a 100% steady-state miss rate withC - 2unvisited "zombie" objects pinned indefinitely.(3, 1000)and(500, 1000).Sharp Phase Transition & Structural Separation:
0%vs>0%steady-state anomaly is impossible on SIEVE (exact state-graph max ratio3/2at(2, 3)and4/3at(2, 4)).FIFO,CLOCK,CLOCK-2bit,Second-Chance, andS3-FIFO(confirmed under exactS3FIFO.csemantics as well), a0%vs>0%anomaly is structurally impossible. However,S3-FIFOexhibits periodic finite Belady spikes at multiple-of-10 capacity boundaries whereSmallgrows whileMainstays fixed (up to2.27xin the SOSP '23 narrative model and1.70xat(39, 40)under exactS3FIFO.c).Persistence Under Mixed Traffic:
1%Zipf background noise (C = 100, 200), SIEVE stayed pinned for all 50,000 requests (100%miss rate vs<1%forCLOCK/S3-FIFO/LRU).25%traffic) never unlockhand(time-to-unwrap = ∞,74.9%miss rate).O(1) Single-Counter Mitigations (
SIEVE-TPvsSIEVE-BW):SIEVE-BW(C/2C)) cures pinning but degrades normal Zipf/Scan miss ratio (avg Δ = +0.0494to+0.0727) by sweeping hot objects nearq_tail—highlighting a direct tradeoff between quick demotion and hand starvation.SIEVE-TP) reduces Zipf/Scan regression by up to3.9xat fast recovery intervals (C..4C) and breakszombie_hits_only (p=25%, C=100)in116requests (0.42%miss). At loose intervals (16C),SIEVE-BW(16C)even slightly improved mean Zipf/Scan miss ratio (avg Δ = -0.0040) while bounding worst-case recovery.Reproducible Artifact
All code, conformance audit (
results/libcachesim_conformance.md), witnesses, figures, and a draft write-up are available here:v0.1.0): https://doi.org/10.5281/zenodo.24588914Everything can be reproduced locally in ~20 seconds via
python reproduce.py --quick(Python 3 + Go, CI-verified).Has this hand-starvation / zombie-pinning behavior in SIEVE been observed or documented previously? Any feedback on edge cases or
libCacheSimimplementation nuances would be greatly appreciated.All reactions