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.
- 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 Scholar
- 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 Scholar
Digital Library
- L. Ballard. Conflict avoidance: Data structures in transactional memory, May 2006. Undergraduate thesis, Brown University.Google Scholar
- R. Bayer. Symmetric binary b-trees: Data structure and maintenance algorithms. Acta Informatica 1, 1(4):290--306, 1972.Google Scholar
Digital Library
- 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 Scholar
- 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 Scholar
Digital Library
- 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 Scholar
- C. Cole and M. Herlihy. Snapshots and software transactional memory. Sci. Comput. Program., 58(3):310--324, 2005. Google Scholar
Digital Library
- T. Crain, V. Gramoli, and M. Raynal. A speculation-friendly binary search tree. Technical Report PI-1984, IRISA, September 2011.Google Scholar
- 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 Scholar
Digital Library
- D. Dice, O. Shalev, , and N. Shavit. Transactional locking II. In Proc. of the 20th Int'l Symp. on Distributed Computing, 2006. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- P. Felber, V. Gramoli, and R. Guerraoui. Elastic transactions. In Proc. of the 23rd Int'l Symp. on Distributed Computing, 2009. Google Scholar
Digital Library
- V. Gramoli and R. Guerraoui. Democratizing transactional programming. In Proc. of the ACM/IFIP/USENIX 12th Int'l Middleware Conference, 2011. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- Intel Corporation. Intel transactional memory compiler and runtime application binary interface, May 2009.Google Scholar
- J. L. W. Kessels. On-the-fly optimization of data structures. Comm. ACM, 26:895--901, 1983. Google Scholar
Digital Library
- U. Manbar and R. E. Ladner. Concurrency control in a dynamic search structure. ACM Trans. Database Syst., 9(3):439--455, 1984. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- J. E. B. Moss. Open nested transactions: Semantics and support. In Workshop on Memory Performance Issues, 2006.Google Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- N. Shavit. Data structures in the multicore age. Commun. ACM, 54(3):76--84, 2011. Google Scholar
Digital Library
- N. Shavit and D. Touitou. Software transactional memory. In Proc. of the 14th ACM Symp. on Principles of Distributed Computing, 1995. Google Scholar
Digital Library
- 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 Scholar
Digital Library
Index Terms
A speculation-friendly binary search tree
Recommendations
A practical concurrent binary search tree
PPoPP '10We propose a concurrent relaxed balance AVL tree algorithm that is fast, scales well, and tolerates contention. It is based on optimistic techniques adapted from software transactional memory, but takes advantage of specific knowledge of the the ...
A speculation-friendly binary search tree
PPoPP '12: Proceedings of the 17th ACM SIGPLAN symposium on Principles and Practice of Parallel ProgrammingWe 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 ...
TxLinux: using and managing hardware transactional memory in an operating system
SOSP '07TxLinux is a variant of Linux that is the first operating system to use hardware transactional memory (HTM) as a synchronization primitive, and the first to manage HTM in the scheduler. This paper describes and measures TxLinux and discusses two ...







Comments