A Contention-Friendly Binary Search Tree

  • Tyler Crain
  • Vincent Gramoli
  • Michel Raynal
Part of the Lecture Notes in Computer Science book series (LNCS, volume 8097)


This paper proposes a new lock-based concurrent binary tree using a methodology for writing concurrent data structures. This methodology limits the high contention induced by today’s multicore environments to come up with efficient alternatives to the most widely used search structures.

Data structures are generally constrained to guarantee a big-oh step complexity even in the presence of concurrency. By contrast our methodology guarantees the big-oh complexity only in the absence of contention and limits the contention when concurrency appears. The key concept lies in dividing update operations within an eager abstract access that returns rapidly for efficiency reason and a lazy structural adaptation that may be postponed to diminish contention. Our evaluation clearly shows that our lock-based tree is up to 2.2× faster than the most recent lock-based tree algorithm we are aware of.


Binary tree Concurrent data structures Efficient implementation 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Mao, Y., Kohler, E., Morris, R.T.: Cache craftiness for fast multicore key-value storage. In: EuroSys., pp. 183–196 (2012)Google Scholar
  2. 2.
    Crain, T., Gramoli, V., Raynal, M.: A speculation-friendly binary search tree. In: PPoPP, pp. 161–170 (2012)Google Scholar
  3. 3.
    Adelson-Velskii, G., Landis, E.M.: An algorithm for the organization of information. In: Proc. of the USSR Academy of Sciences, vol. 146, pp. 263–266 (1962)Google Scholar
  4. 4.
    Bayer, R.: Symmetric binary B-trees: Data structure and maintenance algorithms. Acta Informatica 1 1(4), 290–306 (1972)MathSciNetzbMATHCrossRefGoogle Scholar
  5. 5.
    Bougé, L., Gabarro, J., Messeguer, X., Schabanel, N.: Height-relaxed AVL rebalancing: A unified, fine-grained approach to concurrent dictionaries. Technical Report RR1998-18, ENS Lyon (1998)Google Scholar
  6. 6.
    Guibas, L.J., Sedgewick, R.: A dichromatic framework for balanced trees. In: FOCS, pp. 8–21 (1978)Google Scholar
  7. 7.
    Bayer, R., McCreight, E.: Organization and maintenance of large ordered indices. In: Proc. of the ACM SIGFIDET Workshop on Data Description, Access and Control, pp. 107–141 (1970)Google Scholar
  8. 8.
    Huddleston, S., Mehlhorn, K.: A new data structure for representing sorted lists. Acta Inf. 17, 157–184 (1982)MathSciNetzbMATHCrossRefGoogle Scholar
  9. 9.
    Kessels, J.L.W.: On-the-fly optimization of data structures. Commun. ACM 26(11), 895–901 (1983)zbMATHCrossRefGoogle Scholar
  10. 10.
    Nurmi, O., Soisalon-Soininen, E.: Uncoupling updating and rebalancing in chromatic binary search trees. In: PODS, pp. 192–198 (1991)Google Scholar
  11. 11.
    Nurmi, O., Soisalon-Soininen, E.: Chromatic binary search trees. A structure for concurrent rebalancing. Acta Inf. 33(6), 547–557 (1996)MathSciNetCrossRefGoogle Scholar
  12. 12.
    Boyar, J., Fagerberg, R., Larsen, K.S.: Amortization results for chromatic search trees, with an application to priority queues. J. Comput. Syst. Sci. 55(3), 504–521 (1997)MathSciNetzbMATHCrossRefGoogle Scholar
  13. 13.
    Mohan, C.: Commit-LSN: a novel and simple method for reducing locking and latching in transaction processing systems. In: VLDB, pp. 406–418 (1990)Google Scholar
  14. 14.
    Harris, T.L.: A pragmatic implementation of non-blocking linked-lists. In: Welch, J.L. (ed.) DISC 2001. LNCS, vol. 2180, pp. 300–314. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  15. 15.
    Michael, M.M.: High performance dynamic lock-free hash tables and list-based sets. In: SPAA, pp. 73–82 (2002)Google Scholar
  16. 16.
    Fraser, K.: Practical lock freedom. PhD thesis, Cambridge University (September 2003)Google Scholar
  17. 17.
    Ellen, F., Fatourou, P., Ruppert, E., van Breugel, F.: Non-blocking binary search trees. In: PODC, pp. 131–140 (2010)Google Scholar
  18. 18.
    Herlihy, M., Shavit, N.: The Art of Multiprocessor Programming, p. 528. Morgan Kaufmann (2008)Google Scholar
  19. 19.
    Shavit, N.: Data structures in the multicore age. Commun. ACM 54(3), 76–84 (2011)CrossRefGoogle Scholar
  20. 20.
    Felber, P., Gramoli, V., Guerraoui, R.: Elastic transactions. In: Keidar, I. (ed.) DISC 2009. LNCS, vol. 5805, pp. 93–107. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  21. 21.
    Bronson, N.G., Casper, J., Chafi, H., Olukotun, K.: A practical concurrent binary search tree. In: PPoPP (2010)Google Scholar
  22. 22.
    Crain, T., Gramoli, V., Raynal, M.: Brief announcement: A contention-friendly, non-blocking skip list. In: Aguilera, M.K. (ed.) DISC 2012. LNCS, vol. 7611, pp. 423–424. Springer, Heidelberg (2012)CrossRefGoogle Scholar
  23. 23.
    Crain, T., Gramoli, V., Raynal, M.: No hot spot non-blocking skip list. In: ICDCS (2013)Google Scholar
  24. 24.
    Herlihy, M.P., Wing, J.M.: Linearizability: a correctness condition for concurrent objects. ACM Trans. Program. Lang. Syst. 12, 463–492 (1990)CrossRefGoogle Scholar
  25. 25.
    Herlihy, M.P., Lev, Y., Luchangco, V., Shavit, N.: A simple optimistic skiplist algorithm. In: Prencipe, G., Zaks, S. (eds.) SIROCCO 2007. LNCS, vol. 4474, pp. 124–138. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  26. 26.
    Raynal, M.: Concurrent Programming: Algorithms, Principles, and Foundations. Springer (2013)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2013

Authors and Affiliations

  • Tyler Crain
    • 1
  • Vincent Gramoli
    • 2
  • Michel Raynal
    • 1
    • 3
  1. 1.IRISAUniversité de Rennes 1France
  2. 2.NICTA and University of SydneyAustralia
  3. 3.Institut Universitaire de FranceFrance

Personalised recommendations