skip to main content
10.1145/2555243.2555256acmconferencesArticle/Chapter ViewAbstractPublication PagesppoppConference Proceedingsconference-collections
research-article

Fast concurrent lock-free binary search trees

Published:06 February 2014Publication History

ABSTRACT

We present a new lock-free algorithm for concurrent manipulation of a binary search tree in an asynchronous shared memory system that supports search, insert and delete operations. In addition to read and write instructions, our algorithm uses (single-word) compare-and-swap (CAS) and bit-test-and-set (SETB) atomic instructions, both of which are commonly supported by many modern processors including Intel~64 and AMD64.

In contrast to existing lock-free algorithms for a binary search tree, our algorithm is based on marking edges rather than nodes. As a result, when compared to other lock-free algorithms, modify (insert and delete) operations in our algorithm work on a smaller portion of the tree, thereby reducing conflicts, and execute fewer atomic instructions (one for insert and three for delete). Our experiments indicate that our lock-free algorithm significantly outperforms all other algorithms for a concurrent binary search tree in many cases, especially when contention is high, by as much as 100%.

References

  1. M. A. Bender, J. T. Fineman, S. Gilbert, and B. C. Kuszmaul. Concurrent Cache-Oblivious B-Trees. In Proceedings of the 17th ACM Symposium on Parallelism in Algorithms and Architectures (SPAA), pages 228--237, July 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. A. Braginsky and E. Petrank. A Lock-Free B+ tree. In Proceedings of the 24th ACM Symposium on Parallelism in Algorithms and Architectures (SPAA), pages 58--67, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. N. G. Bronson, J. Casper, H. Chafi, and K. Olukotun. A Practical Concurrent Binary Search Tree. In Proceedings of the 15th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming (PPoPP), pages 257--268, Jan. 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. T. Brown and J. Helga. Non-Blocking k-ary Search Trees. In Proceedings of the International Conference on Principles of Distributed Systems (OPODIS), pages 207--221, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. T. Brown, F. Ellen, and E. Ruppert. Pragmatic Primitives for Non-blocking Data Structures. In Proceedings of the33rdACM Symposium on Principles of Distributed Computing (PODC), pages 207--221, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. T. Brown, F. Ellen, and E. Ruppert. A General Technique for Non-blocking Trees. In Proceedings of the 19th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming (PPoPP), 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. B.Wicht. Binary Trees Implementations Comparison for Multicore Programming. Technical report, Switzerland HES-SO University of Applied Science, June 2012. Code available at: https://github.com/wichtounet/btrees/.Google ScholarGoogle Scholar
  8. P. Chuong, F. Ellen, and V. Ramachandran. A Universal Construction for Wait-Free Transaction Friendly Data Structures. In Proceedings of the 22nd ACM Symposium on Parallelism in Algorithms and Architectures (SPAA), pages 335--344, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. T. H. Cormen, C. E. Leiserson, and R. L. Rivest. Introduction to Algorithms. The MIT Press, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. T. Crain, V. Gramoli, and M. Raynal. A Contention-Friendly Binary Search Tree. In Proceedings of the European Conference on Parallel and Distributed Computing (Euro-Par), pages 229--240, Aachen, Germany, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. D. Drachsler, M. Vechev, and E. Yahav. Practical Concurrent Binary Search Trees via Logical Ordering. In Proceedings of the 19th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming (PPoPP), Orlando, Florida, USA, Feb. 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. F. Ellen, P. Fataourou, E. Ruppert, and F. van Breugel. Non-Blocking Binary Search Trees. In Proceedings of the 29th ACM Symposium on Principles of Distributed Computing (PODC), pages 131--140, July 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. P. Fatourou and N. D. Kallimanis. A Highly-Efficient Wait-Free Universal Construction. In Proceedings of the 23rd ACM Symposium on Parallelism in Algorithms and Architectures (SPAA), pages 325--334, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. M. Fomitchev and E. Ruppert. Lock-Free Linked Lists and Skiplists. In Proceedings of the 23rd ACM Symposium on Principles of Distributed Computing (PODC), pages 50--59, July 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. K. Fraser and T. L. Harris. Concurrent Programming Without Locks. ACM Transactions on Computer Systems, 25 (2), May 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. S. Ghemawat and P. Menage. TCMalloc: Thread-Caching Malloc. URL http://goog-perftools.sourceforge.net/doc/tcmalloc.html.Google ScholarGoogle Scholar
  17. T. Harris. A Pragmatic Implementation of Non-blocking Linked-lists. Distributed Computing (DC), pages 300--314, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. M. Herlihy. Wait-Free Synchronization. ACM Transactions on Programming Languages and Systems (TOPLAS), 13 (1): 124--149, Jan. 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. M. Herlihy. A Methodology for Implementing Highly Concurrent Objects. ACM Transactions on Programming Languages and Systems (TOPLAS), 15 (5): 745--770, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. M. Herlihy and N. Shavit. The Art of Multiprocessor Programming, Revised Reprint. Morgan Kaufmann, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. M. Herlihy and J. M. Wing. Linearizability: A Correctness Condition for Concurrent Objects. ACM Transactions on Programming Languages and Systems (TOPLAS), 12 (3): 463--492, July 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. M. Herlihy, V. Luchangco, and M. Moir. Obstruction-Free Synchronization: Double-Ended Queues as an Example. In Proceedings of the 23rd IEEE International Conference on Distributed Computing Systems (ICDCS), pages 522--529, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. S. V. Howley and J. Jones. A Non-Blocking Internal Binary Search Tree. In Proceedings of the 24th ACM Symposium on Parallelism in Algorithms and Architectures (SPAA), pages 161--171, June 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. J. H. Kim, H. Cameron, and P. Graham. Lock-Free Red-Black Trees Using CAS. Concurrency and Computation: Practice and Experience, pages 1--40, 2006.Google ScholarGoogle Scholar
  25. M. M. Michael. High Performance Dynamic Lock-Free Hash Tables and List-based Sets. In Proceedings of the 14th ACM Symposium on Parallelism in Algorithms and Architectures (SPAA), pages 73--82, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. M. M. Michael. Hazard Pointers: Safe Memory Reclamation for Lock-Free Objects. IEEE Transactions on Parallel and Distributed Systems (TPDS), 15 (6): 491--504, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. A. Natarajan and N. Mittal. Brief Announcement: A Concurrent Lock-Free Red-Black Tree. In Proceedings of the 27th Symposium on Distributed Computing (DISC), Jerusalem, Israel, Oct. 2013.Google ScholarGoogle Scholar
  28. A. Natarajan, L. H. Savoie, and N. Mittal. Concurrent Wait-Free Red-Black Trees. In Proceedings of the 15th International Symposium on Stabilization, Safety, and Security of Distributed Systems (SSS), pages 45--60, Osaka, Japan, Nov. 2013.Google ScholarGoogle ScholarCross RefCross Ref
  29. A. Prokopec, N. G. Bronson, P. Bagwell, and M. Odersky. Concurrent Tries with Efficient Non-Blocking Snapshots. In Proceedings of the 17th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming (PPoPP), pages 151--160, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. N. Shafiei. Non-blocking Patricia Tries with Replace Operations. In Proceedings of the 33rd IEEE International Conference on Distributed Computing Systems (ICDCS), pages 216--225, JUL 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. H. Sundell and P. Tsigas. Scalable and Lock-Free Concurrent Dictionaries. In Proceedings of the 19th Annual Symposium on Selected Areas in Cryptography, pages 1438--1445, Mar. 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Fast concurrent lock-free binary search trees

          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
          • Published in

            cover image ACM Conferences
            PPoPP '14: Proceedings of the 19th ACM SIGPLAN symposium on Principles and practice of parallel programming
            February 2014
            412 pages
            ISBN:9781450326568
            DOI:10.1145/2555243

            Copyright © 2014 ACM

            Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

            Publisher

            Association for Computing Machinery

            New York, NY, United States

            Publication History

            • Published: 6 February 2014

            Permissions

            Request permissions about this article.

            Request Permissions

            Check for updates

            Qualifiers

            • research-article

            Acceptance Rates

            PPoPP '14 Paper Acceptance Rate28of184submissions,15%Overall Acceptance Rate230of1,014submissions,23%

          PDF Format

          View or Download as a PDF file.

          PDF

          eReader

          View online with eReader.

          eReader