arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2302.06520cs.DC
收藏

释放内存的乐观访问:无锁程序中内存回收和分配的混合方法

Releasing Memory with Optimistic Access: A Hybrid Approach to Memory Reclamation and Allocation in Lock-Free Programs

Pedro Moreno, Ricardo Rocha

摘要:

无锁数据结构是开发并发程序的重要工具,因为它们提供了可扩展性、低延迟性,并避免了死锁、活锁和优先级反转。但是,它们需要某种额外的支持来保证内存回收。乐观访问(OA)方法具有内存回收所需的大多数属性,但由于它允许在回收后访问内存,因此它与传统的存储管理模型不兼容。这使得它不能将内存释放给内存分配器/操作系统,因此,它需要复杂的内存回收机制。在本文中,我们扩展了无锁的通用内存分配器LRMalloc支持OA方法。通过这样做,我们能够简化内存回收方法的实现,并允许内存被同一进程的其他部分重用。我们进一步利用由操作系统和硬件提供的虚拟内存系统,以便能够将回收的内存释放到操作系统。

英文摘要:

Lock-free data structures are an important tool for the development of concurrent programs as they provide scalability, low latency and avoid deadlocks, livelocks and priority inversion. However, they require some sort of additional support to guarantee memory reclamation. The Optimistic Access (OA) method has most of the desired properties for memory reclamation, but since it allows memory to be accessed after being reclaimed, it is incompatible with the traditional memory management model. This renders it unable to release memory to the memory allocator/operating system, and, as such, it requires a complex memory recycling mechanism. In this paper, we extend the lock-free general purpose memory allocator LRMalloc to support the OA method. By doing so, we are able to simplify the memory reclamation method implementation and also allow memory to be reused by other parts of the same process. We further exploit the virtual memory system provided by the operating system and hardware in order to make it possible to release reclaimed memory to the operating system.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑