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%.
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 Scholar
- 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 ScholarDigital Library
- T. H. Cormen, C. E. Leiserson, and R. L. Rivest. Introduction to Algorithms. The MIT Press, 1991. Google ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- K. Fraser and T. L. Harris. Concurrent Programming Without Locks. ACM Transactions on Computer Systems, 25 (2), May 2007. Google ScholarDigital Library
- S. Ghemawat and P. Menage. TCMalloc: Thread-Caching Malloc. URL http://goog-perftools.sourceforge.net/doc/tcmalloc.html.Google Scholar
- T. Harris. A Pragmatic Implementation of Non-blocking Linked-lists. Distributed Computing (DC), pages 300--314, 2001. Google ScholarDigital Library
- M. Herlihy. Wait-Free Synchronization. ACM Transactions on Programming Languages and Systems (TOPLAS), 13 (1): 124--149, Jan. 1991. Google ScholarDigital Library
- M. Herlihy. A Methodology for Implementing Highly Concurrent Objects. ACM Transactions on Programming Languages and Systems (TOPLAS), 15 (5): 745--770, 1993. Google ScholarDigital Library
- M. Herlihy and N. Shavit. The Art of Multiprocessor Programming, Revised Reprint. Morgan Kaufmann, 2012. Google ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 Scholar
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 Scholar
- 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 ScholarCross Ref
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
Index Terms
- Fast concurrent lock-free binary search trees
Recommendations
Fast concurrent lock-free binary search trees
PPoPP '14We 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-...
FEAST: A Lightweight Lock-free Concurrent Binary Search Tree
We present a lock-free algorithm for concurrent manipulation of a binary search tree (BST) in an asynchronous shared memory system that supports search, insert, and delete operations. In addition to read and write instructions, our algorithm uses (...
CASTLE: fast concurrent internal binary search tree using edge-based locking
PPoPP 2015: Proceedings of the 20th ACM SIGPLAN Symposium on Principles and Practice of Parallel ProgrammingWe present a new lock-based algorithm for concurrent manipulation of a binary search tree in an asynchronous shared memory system that supports search, insert and delete operations. Some of the desirable characteristics of our algorithm are: (i) a ...
Comments