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.
翻译:无锁数据结构是开发并行程序的一个重要工具,因为它们提供了可缩放性、低悬浮度和避免僵局、活锁和优先倒置。 但是,它们需要某种额外的支持来保证记忆再现。 优化存取(OA)方法拥有最理想的记忆再现特性,但是由于它允许记忆再生后访问,它与传统的记忆管理模式不相容。这使得它无法将记忆释放到内存分配/操作系统,因此,它需要一个复杂的内存循环机制。 在本文中,我们扩展了无锁通用内存缩放电 LRMalloc 以支持 OA 方法。 通过这样做,我们能够简化记忆再利用方法的实施,并允许记忆被同一过程的其他部分再利用。我们进一步利用操作系统和硬件提供的虚拟内存系统,以便能够向操作系统释放再现的内存。