乐观数据结构中用于立即存储器回收的高效硬件基元
Efficient Hardware Primitives for Immediate Memory Reclamation in Optimistic Data Structures
摘要:
安全内存回收(SMR)算法对于防止乐观数据结构中的释放后使用错误至关重要。SMR算法通常会延迟回收以确保安全性,并批量回收对象以提高效率。很难在性能和空间效率之间取得平衡。小批量和频繁的回收尝试会导致高开销,而释放大批量可能会导致长时间的程序中断和高内存占用。一个理想的SMR算法将放弃内存,并立即回收内存,而不会遭受高回收开销。为此,我们提出了条件访问:一组硬件指令,在乐观数据结构中提供立即回收和低开销。条件访问利用缓存一致性使线程能够有效地检测潜在的释放后使用错误,而无需显式共享内存通信,也无需引入额外的一致性流量。我们在Graphite,一个多核模拟器中实现和评估条件接收。我们的实验表明,条件接收可以媲美高度优化和精心调整的SMR算法的性能,同时允许立即回收。这导致并发数据结构具有与其顺序对应物类似的存储器占用空间。
英文摘要:
Safe memory reclamation (SMR) algorithms are crucial for preventing use-after-free errors in optimistic data structures. SMR algorithms typically delay reclamation for safety and reclaim objects in batches for efficiency. It is difficult to strike a balance between performance and space efficiency. Small batch sizes and frequent reclamation attempts lead to high overhead, while freeing large batches can lead to long program interruptions and high memory footprints. An ideal SMR algorithm would forgo batching, and reclaim memory immediately, without suffering high reclamation overheads. To this end, we propose Conditional Access: a set of hardware instructions that offer immediate reclamation and low overhead in optimistic data structures. Conditional Access harnesses cache coherence to enable threads to efficiently detect potential use-after-free errors without explicit shared memory communication, and without introducing additional coherence traffic. We implement and evaluate Conditional Access in Graphite, a multicore simulator. Our experiments show that Conditional Access can rival the performance of highly optimized and carefully tuned SMR algorithms while simultaneously allowing immediate reclamation. This results in concurrent data structures with similar memory footprints to their sequential counterparts.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。