skip to main content
research-article
Open Access

Every data structure deserves lock-free memory reclamation

Published:24 October 2018Publication History
Skip Abstract Section

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.

Skip Supplemental Material Section

Supplemental Material

a143-cohen.webm

References

  1. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  2. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  3. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  4. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  5. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  6. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  7. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  8. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  9. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  10. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  11. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  12. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  13. 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 ScholarGoogle Scholar
  14. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  15. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  16. Timothy L Harris. 2001. A pragmatic implementation of non-blocking linked-lists. In Distrib. Comput. Springer, 300–314. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  18. Maurice Herlihy. 1991. Wait-free synchronization. ACM Trans. Program. Lang. Syst. - TOPLAS 13, 1 (1991), 124–149. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. M.P. Herlihy and J.E.B. Moss. 1992. Lock-free garbage collection for multiprocessors. IEEE Trans. Parallel Distrib. Syst. 3, 3 (1992). Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Maurice Herlihy and Nir Shavit. 2012. The Art of Multiprocessor Programming. Elsevier. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  22. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  23. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  24. 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 ScholarGoogle Scholar
  25. 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 ScholarGoogle Scholar
  26. Maged M. Michael. 2004. Hazard pointers: Safe memory reclamation for lock-free objects. IEEE Trans. Parallel Distrib. Syst. 15, 6 (2004), 491–504. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. 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 ScholarGoogle Scholar
  28. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  29. Erez Petrank. 2012. Can parallel data structures rely on automatic memory managers?. In MSPC. ACM, 1. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Filip Pizlo, Daniel Frampton, Erez Petrank, and Bjarne Steensgard. 2007. Stopless: A Real-Time Garbage Collector for Multiprocessors. In ISMM. 159–172. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Filip Pizlo, Erez Petrank, and Bjarne Steensgaard. 2008. A Study of Concurrent Real-Time Garbage Collectors. In PLDI. 33–44. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  33. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  34. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  35. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  36. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  37. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  38. 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 ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Every data structure deserves lock-free memory reclamation

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in

    Full Access

    • Published in

      cover image Proceedings of the ACM on Programming Languages
      Proceedings of the ACM on Programming Languages  Volume 2, Issue OOPSLA
      November 2018
      1656 pages
      EISSN:2475-1421
      DOI:10.1145/3288538
      Issue’s Table of Contents

      Copyright © 2018 Owner/Author

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 24 October 2018
      Published in pacmpl Volume 2, Issue OOPSLA

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • research-article

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader
    About Cookies On This Site

    We use cookies to ensure that we give you the best experience on our website.

    Learn more

    Got it!