paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Concurrent Immediate Reference Counting

并发即时引用计数
PLDI 8(PLDI)2024匹配度 1/10 · 该论文属于并发运行时内存管理(SMR/引用计数)方向,与用户关注的静态分析、LLM/Agent 改进程序分析、浮点程序分析及贝叶斯程序分析均无直接关联,仅同属程序语言与系统领域。引用 5 inbox
Jaehwang Jung, Jeonghyeon Kim, Matthew J. Parkinson, Jeehoon Kang
dblp: 2026-09-10crossref: 2026-09-10

AI 速览

一句话:提出 CIRC,将安全内存回收与引用计数结合,通过即时递归回收链式结构与即时递减,消除内存增长并缩小性能差距。

无托管语言中乐观并发的内存管理颇具挑战:安全内存回收(SMR)算法虽能解决问题但难以正确使用,自动引用计数接口更简单却效率不及 SMR。近期工作(Fast Reference Counter、OrcGC、Concurrent Deferred Reference Counting)借助 SMR 保护本地引用,通过推迟递减或回收获得显著性能提升,但延迟策略会导致链式结构回收缓慢、内存占用持续增长,且在更新密集负载下性能次优。本文提出并发即时引用计数(CIRC),将 SMR 与引用计数以新方式结合:仍采用延迟思想,但引入两种新算法——(1)通过跟踪每个对象的可达性,递归地立即回收链式结构;(2)立即执行递减,仅延迟回收。实验表明,CIRC 的内存占用不随时间增长,仅略高于底层 SMR,并进一步缩小了与底层 SMR 的性能差距,为无托管语言中高并发数据结构的自动安全内存管理提供了有前景的方案。

问题
无托管语言中乐观并发的自动内存管理难以兼顾正确性与效率:SMR 算法难用,而引用计数虽接口简单却在性能上逊于 SMR,且现有延迟式方法会导致内存占用增长与更新密集负载下的性能退化。
方法
提出并发即时引用计数(CIRC),结合 SMR 与引用计数:通过跟踪每个对象的可达性递归地立即回收链式结构,并立即应用递减而仅延迟回收操作。
评估
通过实验与底层 SMR 及现有方法对比,表明 CIRC 的内存使用不随时间增长、仅略高于底层 SMR,并进一步缩小了与底层 SMR 的性能差距。
原文摘要(Abstract)

Memory management for optimistic concurrency in unmanaged programming languages is challenging. Safe memory reclamation (SMR) algorithms help address this, but they are difficult to use correctly. Automatic reference counting provides a simpler interface, but it has been less efficient than SMR algorithms. Recently, there has been a push to apply the optimizations used in garbage collectors for managed languages to elide reference count updates from local references. Notably, Fast Reference Counter, OrcGC, and Concurrent Deferred Reference Counting use SMR algorithms to protect local references by deferring decrements or reclamation. While they show a significant performance improvement, their use of deferral may result in growing memory usage due to slow reclamation of linked structures, and suboptimal performance in update-heavy workloads. We present Concurrent Immediate Reference Counting (CIRC), a new combination of SMR algorithms with reference counting. CIRC employs deferral like other modern methods, but it avoids their problems with novel algorithms for (1) immediately reclaiming linked structures recursively by tracking the reachability of each object, and (2) applying decrements immediately and deferring only the reclamation. Our experiments show that CIRC’s memory usage does not grow over time and is only slightly higher than the underlying SMR. Moreover, CIRC further narrows the performance gap between the underlying SMR, positioning it as a promising solution to safe automatic memory management for highly concurrent data structures in unmanaged languages.

链接与引用

DOI 原文 · PDF(开放获取) · DBLP

BibTeX
@article{JungKPK24,
  title = {Concurrent Immediate Reference Counting},
  author = {Jaehwang Jung and Jeonghyeon Kim and Matthew J. Parkinson and Jeehoon Kang},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {8},
  number = {PLDI},
  year = {2024},
  doi = {10.1145/3656383}
}