Advertisement

A Concurrency-Optimal Binary Search Tree

  • Vitaly Aksenov
  • Vincent Gramoli
  • Petr Kuznetsov
  • Anna Malova
  • Srivatsan Ravi
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 10417)

Abstract

The paper presents the first concurrency-optimal implementation of a binary search tree (BST). The implementation, based on a standard sequential implementation of a partially-external tree, ensures that every schedule, i.e., interleaving of steps of the sequential code, is accepted unless linearizability is violated. To ensure this property, we use a novel read-write locking protocol that protects tree edges in addition to its nodes.

Our implementation performs comparably to the state-of-the-art BSTs and even outperforms them on few workloads, which suggests that optimizing the set of accepted schedules of the sequential code can be an adequate design principle for efficient concurrent data structures.

Keywords

Concurrency optimality Binary search tree Linearizability 

Notes

Acknowledgements

Vincent Gramoli was financially supported by the Australian Research Council (Discovery Projects funding scheme, project number 160104801 entitled “Data Structures for Multi-Core”). Vitaly Aksenov was financially supported by the Government of Russian Federation (Grant 074-U01) and by the European Research Council (Grant ERC-2012-StG-308246).

References

  1. 1.
    Herlihy, M.: Wait-free synchronization. ACM Trans. Program. Lang. Syst. 13(1), 123–149 (1991)CrossRefGoogle Scholar
  2. 2.
    Gramoli, V., Kuznetsov, P., Ravi, S.: In the search for optimal concurrency. In: Suomela, J. (ed.) SIROCCO 2016. LNCS, vol. 9988, pp. 143–158. Springer, Cham (2016). doi: 10.1007/978-3-319-48314-6_10 CrossRefGoogle Scholar
  3. 3.
    Papadimitriou, C.H.: The serializability of concurrent database updates. J. ACM 26, 631–653 (1979)MathSciNetCrossRefzbMATHGoogle Scholar
  4. 4.
    Chaudhri, V.K., Hadzilacos, V.: Safe locking policies for dynamic databases. J. Comput. Syst. Sci. 57(3), 260–271 (1998)MathSciNetCrossRefzbMATHGoogle Scholar
  5. 5.
    Sutter, H.: Choose concurrency-friendly data structures. Dr. Dobb’s J. (2008)Google Scholar
  6. 6.
    Heller, S., Herlihy, M., Luchangco, V., Moir, M., Scherer, W.N., Shavit, N.: A lazy concurrent list-based set algorithm. In: OPODIS, pp. 3–16 (2006)Google Scholar
  7. 7.
    Herlihy, M., Shavit, N.: On the nature of progress. In: OPODIS, pp. 313–328 (2011)Google Scholar
  8. 8.
    Guerraoui, R., Henzinger, T.A., Singh, V.: Permissiveness in transactional memories. In: DISC, pp. 305–319 (2008)Google Scholar
  9. 9.
    Kuznetsov, P., Ravi, S.: On the cost of concurrency in transactional memory. In: International Conference on Principles of Distributed Systems (OPODIS), pp. 112–127 (2011)Google Scholar
  10. 10.
    Crain, T., Gramoli, V., Raynal, M.: A contention-friendly binary search tree. In: Wolf, F., Mohr, B., Mey, D. (eds.) Euro-Par 2013. LNCS, vol. 8097, pp. 229–240. Springer, Heidelberg (2013). doi: 10.1007/978-3-642-40047-6_25 CrossRefGoogle Scholar
  11. 11.
    Drachsler, D., Vechev, M., Yahav, E.: Practical concurrent binary search trees via logical ordering. In: Proceedings of 19th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, PPoPP 2014, pp. 343–356 (2014)Google Scholar
  12. 12.
    Bronson, N.G., Casper, J., Chafi, H., Olukotun, K.: A practical concurrent binary search tree. In: PPoPP (2010)Google Scholar
  13. 13.
    Ellen, F., Fatourou, P., Ruppert, E., van Breugel, F.: Non-blocking binary search trees. In: PODC, pp. 131–140 (2010)Google Scholar
  14. 14.
    Aksenov, V., Gramoli, V., Kuznetsov, P., Malova, A., Ravi, S.: A concurrency-optimal binary search tree. CoRR abs/1702.04441 (2017)Google Scholar
  15. 15.
    Natarajan, A., Mittal, N.: Fast concurrent lock-free binary search trees. In: PPoPP, pp. 317–328 (2014)Google Scholar
  16. 16.
    Gramoli, V.: More than you ever wanted to know about synchronization: Synchrobench, measuring the impact of the synchronization on concurrent algorithms. In: PPoPP, pp. 1–10 (2015)Google Scholar
  17. 17.
    Gramoli, V., Kuznetsov, P., Ravi, S.: From sequential to concurrent: correctness and relative efficiency (brief announcement). In: Principles of Distributed Computing (PODC), pp. 241–242 (2012)Google Scholar
  18. 18.
    Gramoli, V., Kuznetsov, P., Ravi, S., Shang, D.: A concurrency-optimal list-based set (brief announcement). In: Distributed Computing - 29th International Symposium, DISC 2015, Tokyo, Japan, 7–9 October 2015Google Scholar
  19. 19.
    Cao Minh, C., Chung, J., Kozyrakis, C., Olukotun, K.: STAMP: Stanford transactional applications for multi-processing. In: IISWC (2008)Google Scholar
  20. 20.
    Crain, T., Gramoli, V., Raynal, M.: A speculation-friendly binary search tree. In: PPoPP, pp. 161–170 (2012)Google Scholar
  21. 21.
    Siakavaras, D., Nikas, K., Goumas, G., Koziris, N.: Performance analysis of concurrent red-black trees on HTM platforms. In: 10th ACM SIGPLAN Workshop on Transactional Computing (Transact) (2015)Google Scholar
  22. 22.
    Howley, S.V., Jones, J.: A non-blocking internal binary search tree. In: SPAA, pp. 161–171 (2012)Google Scholar
  23. 23.
    Chatterjee, B., Nguyen, N., Tsigas, P.: Efficient lock-free binary search trees. In: PODC (2014)Google Scholar

Copyright information

© Springer International Publishing AG 2017

Authors and Affiliations

  • Vitaly Aksenov
    • 1
    • 2
  • Vincent Gramoli
    • 3
  • Petr Kuznetsov
    • 4
  • Anna Malova
    • 5
  • Srivatsan Ravi
    • 6
  1. 1.Inria ParisParisFrance
  2. 2.ITMO UniversitySankt-peterburgRussia
  3. 3.University of SydneySydneyAustralia
  4. 4.LTCI, Télécom ParisTechUniversité Paris-SaclayParisFrance
  5. 5.Washington University in St. LouisSt. LouisUSA
  6. 6.Information Sciences InstituteUniversity of Southern CaliforniaLos AngelesUSA

Personalised recommendations