Pathological Cases for a Class of Reachability-Based Garbage Collectors
Matthew Sotoudeh
摘要
Although existing garbage collectors (GCs) perform extremely well on typical programs, there still exist pathological programs for which modern GCs significantly degrade performance. This observation begs the question: might there exist a 'holy grail' GC algorithm, as yet undiscovered, guaranteeing both constant-length pause times and that memory is collected promptly upon becoming unreachable? For decades, researchers have understood that such a GC is not always possible, i.e., some pathological behavior is unavoidable when the program can make heap cycles and operates near the memory limit, regardless of the GC algorithm used. However, this understanding has until now been only informal, lacking a rigorous formal proof.
This paper complements that informal understanding with a rigorous proof, showing with mathematical certainty that every GC algorithm that can implement a realistic mutator-observer interface has some pathological program that forces it to either introduce a long GC pause into program execution or reject an allocation even though there is available space. Hence, language designers must either accept these pathological scenarios and design heuristic approaches that minimize their impact (e.g., generational collection), or restrict programs and environments to a strict subset of the behaviors allowed by our mutator-observer-style interface (e.g., by enforcing a type system that disallows cycles or overprovisioning memory).
We do not expect this paper to have any effect on garbage collection practice. Instead, it provides the first mathematically rigorous answers to these interesting questions about the limits of garbage collection. We do so via rigorous reductions between GC and the dynamic graph reachability problem in complexity theory, so future algorithms and lower bounds from either community transfer to the other via our reductions.
We end by describing how to adapt techniques from the graph data structures community to build a garbage collector making worst-case guarantees that improve performance on our motivating, pathologically memory-constrained scenarios, but in practice find too much overhead to recommend for typical use.
问问这篇 Paper
智能体会读完全文。
Lune 把这篇 Paper 索引到了每一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。
它引用的顶会 Paper3
- A marriage of pointer- and epoch-based reclamationJeehoon Kang, Jaehwang JungPLDI 2020 · 被引用 25 次
- Garbage Collection Makes Rust Easier to Use: A Randomized Controlled Trial of the Bronze Garbage CollectorMichael Coblenz, Michelle L. Mazurek, Michael HicksICSE 2022 · 被引用 9 次
- Super-Logarithmic Lower Bounds for Dynamic Graph ProblemsKasper Green Larsen, Huacheng YuFOCS 2023 · 被引用 2 次
相关 Paper
- Uncovering Hidden Memory Costs for Garbage CollectionSudhanshu Agarwal, Saugata GhoseOOPSLA 2026
- Do you have space for dessert? a verified space cost semantics for CakeML programsAlejandro Gómez-Londoño, Johannes Åman Pohjola, Hira Taqdees Syeda, Magnus O. Myreen 等OOPSLA 2020 · 被引用 12 次
- Jade: A High-throughput Concurrent Copying Garbage CollectorMingyu Wu, Liang Mao, Yude Lin, Yifeng Jin 等EuroSys 2024 · 被引用 5 次
- Work Packets: A New Abstraction for GC Software Engineering, Optimization, and InnovationWenyu Zhao, Stephen M. Blackburn, Kathryn S. McKinleyOOPSLA 2025 · 被引用 3 次
- Optimal heap limits for reducing browser memory useMarisa Kirisame, Pranav Shenoy, Pavel PanchekhaOOPSLA 2022 · 被引用 5 次
