Abstract
In this paper we present interval-based reclamation (IBR), a new approach to safe reclamation of disconnected memory blocks in nonblocking concurrent data structures. Safe reclamation is a difficult problem: a thread, before freeing a block, must ensure that no other threads are accessing that block; the required synchronization tends to be expensive. In contrast with epoch-based reclamation, in which threads reserve all blocks created after a certain time, or pointer-based reclamation (e.g., hazard pointers), in which threads reserve individual blocks, IBR allows a thread to reserve all blocks known to have existed in a bounded interval of time. By comparing a thread's reserved interval with the lifetime of a detached but not yet reclaimed block, the system can determine if the block is safe to free. Like hazard pointers, IBR avoids the possibility that a single stalled thread may reserve an unbounded number of blocks; unlike hazard pointers, it avoids a memory fence on most pointer-following operations. It also avoids the need to explicitly "unreserve" a no-longer-needed pointer.
We describe three specific IBR schemes (one with several variants) that trade off performance, applicability, and space requirements. IBR requires no special hardware or OS support. In experiments with data structure microbenchmarks, it also compares favorably (in both time and space) to other state-of-the-art approaches, making it an attractive alternative for libraries of concurrent data structures.
Supplemental Material
Available for Download
Initial release of Interval-Based Reclamation schemes on Parharness testing platform.
- Dan Alistarh, Patrick Eugster, Maurice Herlihy, Alexander Matveev, and Nir Shavit. 2014. StackTrack: An Automated Transactional Approach to Concurrent Memory Reclamation. In Proc. of the 9th European Conf. on Computer Systems (EuroSys '14). Amsterdam, The Netherlands, 25:1--25:14. Google Scholar
Digital Library
- Dan Alistarh, William M. Leiserson, Alexander Matveev, and Nir Shavit. 2015. ThreadScan: Automatic and Scalable Memory Reclamation. In Proc. of the 27th ACM Symp. on Parallelism in Algorithms and Architectures (SPAA '15). Portland, OR, USA, 123--132. Google Scholar
Digital Library
- Oana Balmau, Rachid Guerraoui, Maurice Herlihy, and Igor Zablotchi. 2016. Fast and Robust Memory Reclamation for Concurrent Data Structures. In Proc. of the 28th ACM Symp. on Parallelism in Algorithms and Architectures (SPAA '16). Pacific Grove, CA, USA, 349--359. Google Scholar
Digital Library
- Anastasia Braginsky, Alex Kogan, and Erez Petrank. 2013. Drop the Anchor: Lightweight Memory Management for Non-blocking Data Structures. In Proc. of the 25th ACM Symp. on Parallelism in Algorithms and Architectures (SPAA '13). Montréal, Québec, Canada, 33--42. Google Scholar
Digital Library
- Trevor Brown. 2015. Reclaiming Memory for Lock-Free Data Structures: There Has to Be a Better Way. In Proc. of the 2015 ACM SIGACT-SIGOPS Symp. on Principles of Distributed Computing (PODC '15). Donostia-San Sebastián, Spain, 261--270. Google Scholar
Digital Library
- Austin T. Clements, M. Frans Kaashoek, and Nickolai Zeldovich. 2012. Scalable Address Spaces Using RCU Balanced Trees. In Proc. of the 17th Intl. Conf. on Architectural Support for Programming Languages and Operating Systems (ASPLOS '12). London, England, UK, 199--210. Google Scholar
Digital Library
- Nachshon Cohen and Erez Petrank. 2015. Efficient Memory Management for Lock-Free Data Structures with Optimistic Access. In Proc. of the 27th ACM Symp. on Parallelism in Algorithms and Architectures (SPAA '15). Portland, Oregon, USA, 254--263. Google Scholar
Digital Library
- Dave Dice, Maurice Herlihy, and Alex Kogan. 2016. Fast Non-intrusive Memory Reclamation for Highly-concurrent Data Structures. In Proc. of the 2016 ACM SIGPLAN Intl. Symp. on Memory Management (ISMM '16). Santa Barbara, CA, USA, 36--45. Google Scholar
Digital Library
- Aleksandar Dragojević, Maurice Herlihy, Yossi Lev, and Mark Moir. 2011. On the Power of Hardware Transactional Memory to Simplify Memory Management. In Proc. of the 2011 ACM SIGACT-SIGOPS Symp. on Principles of Distributed Computing (PODC '11). San Jose, CA, USA, 99--108. Google Scholar
Digital Library
- James R. Driscoll, Neil Sarnak, Daniel D. Sleator, and Robert E. Tarjan. 1986. Making Data Structures Persistent. In Proc. of the 18th Ann. ACM Symp. on Theory of Computing (STOC '86). Berkeley, CA, USA, 109--121. Google Scholar
Digital Library
- Jason Evans. 2006. A scalable concurrent malloc (3) implementation for FreeBSD. In Proc. of the 2006 BSDCan Conf.Google Scholar
- Keir Fraser. 2004. Practical lock-freedom. Ph.D. Dissertation. Computer Laboratory, University of Cambridge. No. UCAM-CL-TR-579.Google Scholar
- Anders Gidenstam, Marina Papatriantafilou, Håkan Sundell, and Philippas Tsigas. 2009. Efficient and Reliable Lock-Free Memory Reclamation Based on Reference Counting. IEEE Trans. on Parallel and Distributed Systems 20, 8 (Aug 2009), 1173--1187. Google Scholar
Digital Library
- Timothy L. Harris. 2001. A Pragmatic Implementation of Non-blocking Linked-Lists. In Proc. of the 15th Intl. Conf. on Distributed Computing (DISC '01). Springer-Verlag, Lisbon, Portugal, 300--314. Google Scholar
Digital Library
- Thomas E. Hart, Paul E. McKenney, Angela Demke Brown, and Jonathan Walpole. 2007. Performance of Memory Reclamation for Lockless Synchronization. Journal of Parallel and Distributed Computing 67, 12 (Dec. 2007), 1270--1285. Google Scholar
Digital Library
- Maurice Herlihy. 1993. A Methodology for Implementing Highly Concurrent Data Objects. ACM Trans. on Programming Languages and Systems 15, 5 (Nov. 1993), 745--770. Google Scholar
Digital Library
- Maurice Herlihy, Victor Luchangco, Paul Martin, and Mark Moir. 2005. Nonblocking Memory Management Support for Dynamic-sized Data Structures. ACM Trans. on Computer Systems 23, 2 (May 2005), 146--196. Google Scholar
Digital Library
- Håkan Sundell. 2005. Wait-Free Reference Counting and Memory Management. In 19th IEEE Intl. Parallel and Distributed Processing Symp. Denver, CO, USA, 24b--24b. Google Scholar
Digital Library
- Paul E. McKenney, Dipankar Sarma, Andrea Arcangeli, Andi Kleen, Orran Krieger, and Rusty Russell. 2002. Read Copy Update. In 2002 Ottawa Linux Symp.Google Scholar
- Maged M. Michael. 2004. Hazard Pointers: Safe Memory Reclamation for Lock-Free Objects. IEEE Trans. on Parallel and Distributed Systems 15, 8 (Aug. 2004), 491--504. Google Scholar
Digital Library
- Maged M. Michael and Michael L. Scott. 1995. Correction of a Memory Management Method for Lock-Free Data Structures. Technical Report TR 599. Dept. of Computer Science, Univ. of Rochester. Google Scholar
Digital Library
- Adam Morrison and Yehuda Afek. 2015. Temporally Bounding TSO for Fence-Free Asymmetric Synchronization. In Proc. of the 20th Intl. Conf. on Architectural Support for Programming Languages and Operating Systems (ASPLOS '15). Istanbul, Turkey, 45--58. Google Scholar
Digital Library
- Aravind Natarajan and Neeraj Mittal. 2014. Fast Concurrent Lock-free Binary Search Trees. In Proc. of the 19th ACM SIGPLAN Symp. on Principles and Practice of Parallel Programming (PPoPP '14). Orlando, FL, USA, 317--328. Google Scholar
Digital Library
- Chris Okasaki. 1999. Purely functional data structures. Cambridge University Press. Google Scholar
Digital Library
- Pedro Ramalhete and Andreia Correia. 2017. Brief Announcement: Hazard Eras - Non-Blocking Memory Reclamation. In Proc. of the 29th ACM Symp. on Parallelism in Algorithms and Architectures (SPAA '17). Washington, DC, USA, 367--369. Google Scholar
Digital Library
- R. Kent Treiber. 1986. Systems Programming: Coping with Parallelism. Technical Report RJ 5118. IBM Almaden Research Center.Google Scholar
- John D. Valois. 1995. Lock-free Linked Lists Using Compare-and-swap. In Proc. of the 1995 ACM SIGACT-SIGOPS Symp. on Principles of Distributed Computing (PODC '95). Ottowa, Ontario, Canada, 214--222. Google Scholar
Digital Library
Index Terms
Interval-based memory reclamation
Recommendations
Universal wait-free memory reclamation
PPoPP '20: Proceedings of the 25th ACM SIGPLAN Symposium on Principles and Practice of Parallel ProgrammingIn this paper, we present a universal memory reclamation scheme, Wait-Free Eras (WFE), for deleted memory blocks in wait-free concurrent data structures. WFE's key innovation is that it is completely wait-free. Although some prior techniques provide ...
Interval-based memory reclamation
PPoPP '18: Proceedings of the 23rd ACM SIGPLAN Symposium on Principles and Practice of Parallel ProgrammingIn this paper we present interval-based reclamation (IBR), a new approach to safe reclamation of disconnected memory blocks in nonblocking concurrent data structures. Safe reclamation is a difficult problem: a thread, before freeing a block, must ensure ...
Efficient and Reliable Lock-Free Memory Reclamation Based on Reference Counting
We present an efficient and practical lock-free method for semiautomatic (application-guided) memory reclamation based on reference counting, aimed for use with arbitrary lock-free dynamic data structures. The method guarantees the safety of local as ...







Comments