skip to main content
research-article

A speculation-friendly binary search tree

Published:25 February 2012Publication History
Skip Abstract Section

Abstract

We introduce the first binary search tree algorithm designed for speculative executions. Prior to this work, tree structures were mainly designed for their pessimistic (non-speculative) accesses to have a bounded complexity. Researchers tried to evaluate transactional memory using such tree structures whose prominent example is the red-black tree library developed by Oracle Labs that is part of multiple benchmark distributions. Although well-engineered, such structures remain badly suited for speculative accesses, whose step complexity might raise dramatically with contention.

We show that our speculation-friendly tree outperforms the existing transaction-based version of the AVL and the red-black trees. Its key novelty stems from the decoupling of update operations: they are split into one transaction that modifies the abstraction state and multiple ones that restructure its tree implementation in the background. In particular, the speculation-friendly tree is shown correct, reusable and it speeds up a transaction-based travel reservation application by up to 3.5x.

References

  1. G. Adelson-Velskii and E. M. Landis. An algorithm for the organization of information. In Proc. of the USSR Academy of Sciences, volume 146, pages 263--266, 1962.Google ScholarGoogle Scholar
  2. K. Agrawal, I.-T. A. Lee, and J. Sukha. Safe open-nested transactions through ownership. In Proc. of the 14th ACM SIGPLAN Symp. on Principles and Practice of Parallel Programming, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. L. Ballard. Conflict avoidance: Data structures in transactional memory, May 2006. Undergraduate thesis, Brown University.Google ScholarGoogle Scholar
  4. R. Bayer. Symmetric binary b-trees: Data structure and maintenance algorithms. Acta Informatica 1, 1(4):290--306, 1972.Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. L. Bougé, J. Gabarro, X. Messeguer, and N. Schabanel. Height-relaxed AVL rebalancing: A unified, fine-grained approach to concurrent dictionaries, 1998. Research Report 1998--18, ENS Lyon.Google ScholarGoogle Scholar
  6. N. G. Bronson, J. Casper, H. Chafi, and K. Olukotun. A practical concurrent binary search tree. In Proc. of the 15th ACM SIGPLAN Symp. on Principles and Practice of Parallel Programming, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. C. Cao Minh, J. Chung, C. Kozyrakis, and K. Olukotun. STAMP: Stanford transactional applications for multi-processing. In Proc. of The IEEE Int'l Symp. on Workload Characterization, 2008.Google ScholarGoogle Scholar
  8. C. Cole and M. Herlihy. Snapshots and software transactional memory. Sci. Comput. Program., 58(3):310--324, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. T. Crain, V. Gramoli, and M. Raynal. A speculation-friendly binary search tree. Technical Report PI-1984, IRISA, September 2011.Google ScholarGoogle Scholar
  10. L. Dalessandro, M. Spear, and M. L. Scott. NOrec: streamlining S™ by abolishing ownership records. In Proc. of the 15th ACM SIGPLAN Symp. on Principles and Practice of Parallel Programming, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. D. Dice, O. Shalev, , and N. Shavit. Transactional locking II. In Proc. of the 20th Int'l Symp. on Distributed Computing, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. E. W. Dijkstra, L. Lamport, A. J. Martin, C. S. Scholten, and E. F. M. Steffens. On-the-fly garbage collection: an exercise in cooperation. Commun. ACM, 21(11):966--975, 1978. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. A. Dragojevic, P. Felber, V. Gramoli, and R. Guerraoui. Why S™ can be more than a research toy. Commun. ACM, 54(4):70--77, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. P. Felber, C. Fetzer, and T. Riegel. Dynamic performance tuning of word-based software transactional memory. In Proc. of the 13th ACM SIGPLAN Symp. on Principles and Practice of Parallel Programming, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. P. Felber, V. Gramoli, and R. Guerraoui. Elastic transactions. In Proc. of the 23rd Int'l Symp. on Distributed Computing, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. V. Gramoli and R. Guerraoui. Democratizing transactional programming. In Proc. of the ACM/IFIP/USENIX 12th Int'l Middleware Conference, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. L. J. Guibas and R. Sedgewick. A dichromatic framework for balanced trees. In Proc. of the 19th Annual Symp. on Foundations of Computer Science, 1978. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. T. Harris, S. Marlow, S. Peyton-Jones, and M. Herlihy. Composable memory transactions. In Proc. of the 10th ACM SIGPLAN Symp. on Principles and Practice of Parallel Programming, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. M. Herlihy and E. Koskinen. Transactional boosting: A methodology for highly-concurrent transactional objects. In Proc. of the 13th ACM SIGPLAN Symp. on Principles and Practice of Parallel Programming, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. M. Herlihy, V. Luchangco, M. Moir, and W. N. Scherer, III. Software transactional memory for dynamic-sized data structures. In Proc. of the 22nd Annual ACM SIGACT-SIGOPS Symp. on Principles of Distributed Computing, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. M. Herlihy and J. E. B. Moss. Transactional memory: Architectural support for lock-free data structures. In Proc. of the 20th Annual Int'l Symp. on Computer Architecture, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Intel Corporation. Intel transactional memory compiler and runtime application binary interface, May 2009.Google ScholarGoogle Scholar
  23. J. L. W. Kessels. On-the-fly optimization of data structures. Comm. ACM, 26:895--901, 1983. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. U. Manbar and R. E. Ladner. Concurrency control in a dynamic search structure. ACM Trans. Database Syst., 9(3):439--455, 1984. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. C. Mohan. Commit-LSN: a novel and simple method for reducing locking and latching in transaction processing systems. In Proc. of the 16th Int'l Conference on Very Large Data Bases, 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. J. E. B. Moss. Open nested transactions: Semantics and support. In Workshop on Memory Performance Issues, 2006.Google ScholarGoogle Scholar
  27. Y. Ni, V. Menon, A.-R. Abd-Tabatabai, A. L. Hosking, R. L. Hudson, J. E. B. Moss, B. Saha, and T. Shpeisman. Open nesting in software transactional memory. In Proc. of the 12th ACM SIGPLAN Symp. on Principles and Practice of Parallel Programming, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. O. Nurmi and E. Soisalon-Soininen. Uncoupling updating and rebalancing in chromatic binary search trees. In Proc. of the 10th ACM Symp. on Principles of Database Systems, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. O. Nurmi, E. Soisalon-Soininen, and D. Wood. Concurrency control in database structures with relaxed balance. In Proc. of the 6th ACM Symp. on Principles of Database Systems, 1987. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. V. Pankratius and A.-R. Adl-Tabatabai. A study of transactional memory vs. locks in practice. In Proc. of the 23rd ACM Symp. on Parallelism in Algorithms and Architectures, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. C. J. Rossbach, O. S. Hofmann, and E. Witchel. Is transactional programming actually easier? In Proc. of the 15th ACM SIGPLAN Symp. on Principles and Practice of Parallel Programming, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. N. Shavit. Data structures in the multicore age. Commun. ACM, 54(3):76--84, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. N. Shavit and D. Touitou. Software transactional memory. In Proc. of the 14th ACM Symp. on Principles of Distributed Computing, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. R. M. Yoo, Y. Ni, A. Welc, B. Saha, A.-R. Adl-Tabatabai, and H.-H. S. Lee. Kicking the tires of software transactional memory: why the going gets tough. In Proc. of the 20th ACM Symp. on Parallelism in Algorithms and Architectures, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. A speculation-friendly binary search tree

      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 ACM SIGPLAN Notices
        ACM SIGPLAN Notices  Volume 47, Issue 8
        PPOPP '12
        August 2012
        334 pages
        ISSN:0362-1340
        EISSN:1558-1160
        DOI:10.1145/2370036
        Issue’s Table of Contents
        • cover image ACM Conferences
          PPoPP '12: Proceedings of the 17th ACM SIGPLAN symposium on Principles and Practice of Parallel Programming
          February 2012
          352 pages
          ISBN:9781450311601
          DOI:10.1145/2145816

        Copyright © 2012 ACM

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 25 February 2012

        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!