Abstract
Memory-management support for lock-free data structures is well known to be a tough problem. Recent work has successfully reduced the overhead of such schemes. However, applying memory-management support to a data structure remains complex and, in many cases, requires redesigning the data structure. In this paper, we present the first lock-free memory-management scheme that is applicable to general (arbitrary) lock-free data structures and that can be applied automatically via a compiler plug-in. In addition to the simplicity of incorporating to data structures, this scheme provides low overhead and does not rely on the lock freedom of any OS services.
Supplemental Material
- Dan Alistarh, William Leiserson, Alexander Matveev, and Nir Shavit. 2017. Conservative Memory Reclamation for Modern Operating Systems. In Proc. Twelfth Eur. Conf. Comput. Syst. - EuroSys ’17. ACM Press, New York, New York, USA, 483–498. Google Scholar
Digital Library
- Dan Alistarh, William M. Leiserson, Alexander Matveev, and Nir Shavit. 2015. ThreadScan: Automatic and Scalable Memory Reclamation. In Proc. 27th ACM Symp. Parallelism Algorithms Archit. - SPAA ’15. ACM Press, New York, New York, USA, 123–132. Google Scholar
Digital Library
- Joshua Auerbach, David F. Bacon, Perry Cheng, David Grove, Ben Biron, Charlie Gracie, Bill McCloskey, Aleksandar Micic, and Ryan Sciampacone. 2008. Tax-and-Spend: Democratic Scheduling for Real-Time Garbage Collection. In EMSOFT. 245–254. 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. 28th ACM Symp. Parallelism Algorithms Archit. - SPAA ’16. ACM Press, New York, New York, USA, 349–359. Google Scholar
Digital Library
- Dmitry Basin, Edward Bortnikov, Anastasia Braginsky, Guy Golan-Gueta, Eshcar Hillel, Idit Keidar, and Moshe Sulamy. 2017. KiWi: A Key-Value Map for Scalable Real-Time Analytics. In Proc. 22nd ACM SIGPLAN Symp. Princ. Pract. Parallel Program. - PPoPP ’17. ACM Press, New York, New York, USA, 357–369. Google Scholar
Digital Library
- Hans Boehm. 2012. Can seqlocks get along with programming language memory models?. In Proc. 2012 ACM SIGPLAN Work. Mem. Syst. Perform. Correctness - MSPC ’12. ACM Press, New York, New York, USA, 12. Google Scholar
Digital Library
- Anastasia Braginsky, Nachshon Cohen, and Erez Petrank. 2016. CBPQ: High Performance Lock-Free Priority Queue. In 22nd Int. Eur. Conf. Parallel Distrib. Comput. Springer, Cham, 460–474. Google Scholar
Digital Library
- Anastasia Braginsky, Alex Kogan, and Erez Petrank. 2013. Drop the anchor: lightweight memory management for nonblocking data structures. In Proc. twenty-fifth Annu. ACM Symp. Parallelism algorithms Archit. ACM, 33–42. Google Scholar
Digital Library
- Trevor Alexander Brown. 2015. Reclaiming Memory for Lock-Free Data Structures. In Proc. 2015 ACM Symp. Princ. Distrib. Comput. - Pod. ’15. ACM Press, New York, New York, USA, 261–270.Google Scholar
Digital Library
- Nachshon Cohen and Erez Petrank. 2015a. Automatic memory reclamation for lock-free data structures. In Proc. 2015 ACM SIGPLAN Int. Conf. Object-Oriented Program. Syst. Lang. Appl. - OOPSLA 2015, Vol. 50. ACM Press, New York, New York, USA, 260–279. Google Scholar
Digital Library
- Nachshon Cohen and Erez Petrank. 2015b. Efficient Memory Management for Lock-Free Data Structures with Optimistic Access. In Proc. 27th ACM Symp. Parallelism Algorithms Archit. - SPAA ’15. ACM Press, New York, New York, USA, 254–263. Google Scholar
Digital Library
- Nachshon Cohen, Arie Tal, Erez Petrank, Nachshon Cohen, Arie Tal, and Erez Petrank. 2017. Layout Lock: A Scalable Locking Paradigm for Concurrent Data Layout Modifications. In Proc. 22nd ACM SIGPLAN Symp. Princ. Pract. Parallel Program. - PPoPP ’17, Vol. 52. ACM Press, New York, New York, USA, 17–29. Google Scholar
Digital Library
- Dave Dice, Timothy L Harris, Alex Kogan, Yossi Lev, and Mark Moir. 2014. Pitfalls of lazy subscription. 6th Work. Theory Trans. Mem. - WTTM’14 (2014).Google Scholar
- Dave Dice, Maurice Herlihy, and Alex Kogan. 2016. Fast non-intrusive memory reclamation for highly-concurrent data structures. In Proc. 2016 ACM SIGPLAN Int. Symp. Mem. Manag. - ISMM 2016. ACM Press, New York, New York, USA, 36–45. Google Scholar
Digital Library
- Panagiota Fatourou and Nikolaos D. Kallimanis. 2011. A highly-efficient wait-free universal construction. In Proc. 23rd ACM Symp. Parallelism algorithms Archit. - SPAA ’11. ACM Press, New York, New York, USA, 325. Google Scholar
Digital Library
- Timothy L Harris. 2001. A pragmatic implementation of non-blocking linked-lists. In Distrib. Comput. Springer, 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. JPDC (2007), 1270–1285. Google Scholar
Digital Library
- Maurice Herlihy. 1991. Wait-free synchronization. ACM Trans. Program. Lang. Syst. - TOPLAS 13, 1 (1991), 124–149. Google Scholar
Digital Library
- M.P. Herlihy and J.E.B. Moss. 1992. Lock-free garbage collection for multiprocessors. IEEE Trans. Parallel Distrib. Syst. 3, 3 (1992). Google Scholar
Digital Library
- Maurice Herlihy and Nir Shavit. 2012. The Art of Multiprocessor Programming. Elsevier. Google Scholar
Digital Library
- Richard L. Hudson and J. Eliot B. Moss. 2001. Sapphire: Copying GC Without Stopping The World. In Joint ACM-ISCOPE Conference on Java Grande. 48–57. Google Scholar
Digital Library
- Alex Kogan and Erez Petrank. 2011. Wait-free queues with multiple enqueuers and dequeuers. In Proc. 16th ACM Symp. Princ. Pract. parallel Program. - PPoPP ’11, Vol. 46. ACM Press, New York, New York, USA, 223. Google Scholar
Digital Library
- Alex Kogan and Erez Petrank. 2012. A methodology for creating fast wait-free data structures. In Proc. 17th ACM SIGPLAN Symp. Princ. Pract. Parallel Program. - PPoPP ’12, Vol. 47. ACM Press, New York, New York, USA, 141. Google Scholar
Digital Library
- Daug Lea and JSR-166. 2013. http://grepcode.com/file/repository. grepcode.com/java/root/jdk/openjdk/8u40-b25/java/util/concurrent/locks/StampedLock.java.Google Scholar
- Maged M Michael. 2002a. Safe Memory Reclamation for Dynamic Lock-Free Objects Using Atomic Reads and Writes. Research Report RC22317. {IBM} Corp., Thomas J Watson Research Center, Yorktown Heights, NY. 21 pages.Google Scholar
- Maged M. Michael. 2004. Hazard pointers: Safe memory reclamation for lock-free objects. IEEE Trans. Parallel Distrib. Syst. 15, 6 (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 8930. University of Rochester. 1–7 pages.Google Scholar
- Mm Maged M Michael. 2002b. High performance dynamic lock-free hash tables and list-based sets. In Proc. fourteenth Annu. ACM Symp. . . . . ACM, 73–82. Google Scholar
Digital Library
- Erez Petrank. 2012. Can parallel data structures rely on automatic memory managers?. In MSPC. ACM, 1. Google Scholar
Digital Library
- Filip Pizlo, Daniel Frampton, Erez Petrank, and Bjarne Steensgard. 2007. Stopless: A Real-Time Garbage Collector for Multiprocessors. In ISMM. 159–172. Google Scholar
Digital Library
- Filip Pizlo, Erez Petrank, and Bjarne Steensgaard. 2008. A Study of Concurrent Real-Time Garbage Collectors. In PLDI. 33–44. Google Scholar
Digital Library
- Filip Pizlo, Lukasz Ziarek, Petr Maj, Antony L. Hosking, Ethan Blanton, and Jan Vitek. 2010. Schism: Fragmentation-Tolerant Real-Time Garbage collection. In PLDI. 146–159. Google Scholar
Digital Library
- Pedro Ramalhete and Andreia Correia. 2017. Brief announcement: Hazard eras-non-blocking memory reclamation. In Proceedings of the 29th ACM Symposium on Parallelism in Algorithms and Architectures. ACM, 367–369. Google Scholar
Digital Library
- Shahar Timnat, Anastasia Braginsky, Alex Kogan, and Erez Petrank. 2012. Wait-free linked-lists. In Proc. 17th ACM SIGPLAN Symp. Princ. Pract. Parallel Program. - PPoPP ’12, Vol. 47. ACM Press, New York, New York, USA, 309. Google Scholar
Digital Library
- Shahar Timnat and Erez Petrank. 2014. A practical wait-free simulation for lock-free data structures. In Proc. 19th ACM SIGPLAN Symp. Princ. Pract. parallel Program. - PPoPP ’14. ACM, 357–368. Google Scholar
Digital Library
- John D Valois. 1995. Lock-free linked lists using compare-and-swap. In Proc. fourteenth Annu. ACM Symp. Princ. Distrib. Comput. - Pod. ACM, 214–222. Google Scholar
Digital Library
- Haosen Wen, Joseph Izraelevitz, Wentao Cai, H Alan Beadle, and Michael L Scott. 2018. Interval-based memory reclamation. In Proceedings of the 23rd ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming. ACM, 1–13. Google Scholar
Digital Library
- Chaoran Yang and John Mellor-Crummey. 2016. A wait-free queue as fast as fetch-and-add. In Proc. 21st ACM SIGPLAN Symp. Princ. Pract. Parallel Program. - PPoPP ’16, Vol. 51. ACM Press, New York, New York, USA, 1–13. Google Scholar
Digital Library
Index Terms
Every data structure deserves lock-free 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 ...
Releasing Memory with Optimistic Access: A Hybrid Approach to Memory Reclamation and Allocation in Lock-Free Programs
SPAA '23: Proceedings of the 35th ACM Symposium on Parallelism in Algorithms and ArchitecturesLock-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 ...
Automatic memory reclamation for lock-free data structures
OOPSLA 2015: Proceedings of the 2015 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and ApplicationsLock-free data-structures are widely employed in practice, yet designing lock-free memory reclamation for them is notoriously difficult. In particular, all known lock-free reclamation schemes are ``manual'' in the sense that the developer has to ...






Comments