无锁数据结构的无快照、透明和健壮的内存回收
Snapshot-Free, Transparent, and Robust Memory Reclamation for Lock-Free Data Structures
摘要:
我们提出了一个家庭的安全内存回收计划,透明,这是快速,可扩展的,和透明的底层无锁数据结构。Hyaline是基于引用计数的-由于开销高,在过去被认为是不切实际的内存回收。Hyaline仅在回收期间使用引用计数器,而在访问单个对象时不使用,这减少了对象访问的开销。由于使用引用计数器,任意线程最终都会释放内存,因此Hyaline的回收工作负载(几乎)在所有线程之间平衡,这与大多数先前的回收方案(如基于epoch的回收(EBR)或危险指针(HP))不同。Hyaline通常会产生(优秀的)EBR级性能和(良好的)HP级内存效率,这对所有现有方案来说都是一个具有挑战性的折衷。Hyaline方案提供:(i)高绩效;(ii)良好的内存效率;(iii)健壮性:即使在存在停滞线程的情况下也限制内存使用,这是EBR的一个众所周知的问题;(iv)透明性:支持几乎无限数量的线程(v)自主性:避免特殊的OS机制并且对运行时或编译器环境是非侵入性的; ㈥简单:使得能够容易地集成到非托管C/C++代码中;以及(vii)通用性:支持许多数据结构。所有现有的方案都缺少一个或多个属性。我们已经在x86(-64)、ARM 32/64、PowerPC和MIPS上实现并测试了Hyaline。一般的方法需要LL/SC或双宽度CAS,而专用版本也可以使用单宽度CAS。我们的评估显示,Hyaline的吞吐量非常高--在一次测试中,它的性能稳定地比EBR高出10%,并且在超额认购场景中获得2倍的收益。Hyaline卓越的内存效率在以读取为主的工作负载中尤为明显
英文摘要:
We present a family of safe memory reclamation schemes, Hyaline, which are fast, scalable, and transparent to the underlying lock-free data structures. Hyaline is based on reference counting - considered impractical for memory reclamation in the past due to high overheads. Hyaline uses reference counters only during reclamation, but not while accessing individual objects, which reduces overheads for object accesses. Since with reference counters, an arbitrary thread ends up freeing memory, Hyaline's reclamation workload is (almost) balanced across all threads, unlike most prior reclamation schemes such as epoch-based reclamation (EBR) or hazard pointers (HP). Hyaline often yields (excellent) EBR-grade performance with (good) HP-grade memory efficiency, which is a challenging tradeoff with all existing schemes. Hyaline schemes offer: (i) high performance; (ii) good memory efficiency; (iii) robustness: bounding memory usage even in the presence of stalled threads, a well-known problem with EBR; (iv) transparency: supporting virtually unbounded number of threads (or concurrent entities) that can be created and deleted dynamically, and effortlessly join existent workload; (v) autonomy: avoiding special OS mechanisms and being non-intrusive to runtime or compiler environments; (vi) simplicity: enabling easy integration into unmanaged C/C++ code; and (vii) generality: supporting many data structures. All existing schemes lack one or more properties. We have implemented and tested Hyaline on x86(-64), ARM32/64, PowerPC, and MIPS. The general approach requires LL/SC or double-width CAS, while a specialized version also works with single-width CAS. Our evaluation reveals that Hyaline's throughput is very high - it steadily outperforms EBR by 10% in one test and yields 2x gains in oversubscribed scenarios. Hyaline's superior memory efficiency is especially evident in read-dominated workloads
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。