ABSTRACT
Memory transactions, similar to database transactions, allow a programmer to focus on the logic of their program and let the system ensure that transactions are atomic and isolated. Thus, programs using transactions do not suffer from deadlock. However, when a transaction performs I/O or accesses kernel resources, the atomicity and isolation guarantees from the TM system do not apply to the kernel.
The xCall interface is a new API that provides transactional semantics for system calls. With a combination of deferral and compensation, xCalls enable transactional memory programs to use common OS functionality within transactions.
We implement xCalls for the Intel Software Transactional Memory compiler, and found it straightforward to convert programs to use transactions and xCalls. In tests on a 16-core NUMA machine, we show that xCalls enable concurrent I/O and system calls within transactions. Despite the overhead of implementing transactions in software, transactions with xCalls improved the performance of two applications with poor locking behavior by 16 and 70%.
- Lee Baugh, Naveen Neelakantam, and Craig Zilles. Using hardware memory protection to build a high-performance, strongly-atomic hybrid transactional memory. In ISCA 35, June 2008. Google ScholarDigital Library
- Lee Baugh and Craig Zilles. An analysis of I/O and syscalls in critical sections and their implications for transactional memory. In TRANSACT 2, August 2007.Google Scholar
- Andrew D. Birrell and Michael Isard. Automatic mutual exclusion. In HotOS 11, May 2007.Google Scholar
- Colin Blundell, Joe Devietti, E Christopher Lewis, and Milo M.K. Martin. Making the fast case common and the uncommon case simple in unbounded transactional memory. In ISCA 34, June 2007. Google ScholarDigital Library
- Bryan Cantrill. Concurrency's shysters. http://blogs.sun.com/bmc/entry/concurrency_s_shysters, November 2008.Google Scholar
- Calin Cascaval, Colin Blundell, Maged Michael, Harold W. Cain, Peng Wu, Stefanie Chiras, and Siddhartha Chatterjee. Software transactional memory: why is it only a research toy? Commun. ACM, 51(11):40--46, 2008. Google ScholarDigital Library
- Peter Damron, Alexandra Fedorova, Yossi Lev, Victor Luchango, Mark Moir, and Daniel Nussbaum. Hybrid transactional memory. In ASPLOS 12, October 2006. Google ScholarDigital Library
- Dave Dice, Ori Shalev, and Nir Shavit. Transactional locking ii. In DISC 20, September 2006. Google ScholarDigital Library
- Polina Dudnik and Michael M. Swift. Condition variables and transactional memory: Problem or opportunity? In TRANSACT 4, February 2009.Google Scholar
- Alexandra Fedorova, Margo Seltzer, and Michael D. Smith. Improving performance isolation on chip multiprocessors via an operating system scheduler. In PACT 16, pages 25--38, 2007. Google ScholarDigital Library
- Christof Fetzer and Pascal Felber. Improving program correctness with atomic exception handling. Journal of Universal Computer Science, 13(8):1047--1072, 2007.Google Scholar
- Richard M. Fujimoto. The virtual time machine. In Proceedings of the First ACM Symposium on Parallel Algorithms and Architectures, June 1989. Google ScholarDigital Library
- Jim Gray and Andreas Reuter. Transaction Processing:Concepts and Techniques. Morgan Kaufmann, 1993. ISBN 1-55860-190-2. Google ScholarDigital Library
- Lance Hammond, Vicky Wong, Mike Chen, Brian D. Carlstrom, John D. Davis, Ben Hertzberg, Manohar K. Prabhu, Honggo Wijaya, Christos Kozyrakis, and Kunle Olukotun. Transactional memory coherence and consistency. In ISCA 31, June 2004. Google ScholarDigital Library
- Tim Harris. Exceptions and side-effects in atomic blocks. In PODC Workshop on Concurrency and Synchronization in Java Programs, Jul 2004.Google Scholar
- Tim Harris and Keir Fraser. Language support for lightweight transactions. In OOPSLA 18, October 2003. Google ScholarDigital Library
- Tim Harris, Simon Marlow, Simon Peyton Jones, and Maurice Herlihy. Composable memory transactions. In PPOPP 12, June 1991.Google Scholar
- Tim Harris, Mark Plesko, Avraham Shinnar, and David Tarditi. Optimizing memory transactions. In PLDI 2006, June 2006. Google ScholarDigital Library
- Roger Haskin, Yoni Malachi, Wayne Sawdon, and Gregory Chan. Recovery management in quicksilver. In SOSP 11, pages 107--108, November 1987. Google ScholarDigital Library
- Maurice Herlihy and J. Eliot B. Moss. Transactional memory: Architectural support for lock-free data structures. Technical Report Technical Report 92/07, Digital Cambridge Research Lab, 1992.Google Scholar
- Intel. Intel c++ stm compiler prototype edition 2.0 language extensions and user's guide. Technical Report 318253-001US, Intel Corp., April 2008.Google Scholar
- Internet Systems Consortium. Berkeley internet name domain (BIND). http://www.isc.org/index.pl?/sw/bind/.Google Scholar
- David R. Jefferson. Virtual time. ACM Transactions on Programming Languages and Systems, 7(3):404--425, 1985. Google ScholarDigital Library
- Tatuya Jinmei and Paul Vixie. Implementation and evaluation of moderate parallelism in the BIND9 DNS server. In Usenix ATC 2006, June 2006. Google ScholarDigital Library
- Horatiu Jula, Daniel Tralamazza, Cristian Zamfir, and George Candea. Deadlock immunity: Enabling systems to defend against deadlocks. In OSDI 8, November 2008. Google ScholarDigital Library
- David E. Lowell and Peter M. Chen. Persistent messages in local transactions. In PODC 17, pages 219--226, 1998. Google ScholarDigital Library
- Shan Lu, Soyeon Park, Eunsoo Seo, and Yuanyuan Zhou. Learning from mistakes: A comprehensive study on real world concurrency bug characteristics. In ASPLOS 13, October 2006. Google ScholarDigital Library
- Austen McDonald, JaeWoong Chung, Brian Carlstrom, Chi Cao Minh, Hassan Chafi, Christos Kozyrakis and Kunle Olukotun. Architectural semantics for practical transactional memory. In ISCA 33, June 2006. Google ScholarDigital Library
- Vijay Menon, Steven Balensiefer, Tatiana Shpeisman, Ali-Reza Adl-Tabatabai, Richard L. Hudson, Bratin Saha, and Adam Welc. Single global lock semantics in a weakly atomic STM. In TRANSACT 3, February 2008. Google ScholarDigital Library
- Microsoft Corp. Transactional memory team blog. http://blogs.msdn.com/stmteam/default.aspx, October 2008.Google Scholar
- Chi Cao Minh, Martin Trautmann, JaeWoong Chung, Austen Mcdonald, Nathan Bronson, Jared Casper, Christos Kozyrakis, and Kunle Olukotun. An effective hybrid transactional memory system with strong isolation guarantees. In ISCA 34, June 2007.Google ScholarDigital Library
- Kevin E. Moore, Jayaram Bobba, Michelle J. Moravan, Mark D. Hill, and David A.Wood. Logtm: Log-based transactional memory. In HPCA 12, pages 258--269, February 2006.Google ScholarCross Ref
- Michelle J. Moravan, Jayaram Bobba, Kevin E. Moore, Luke Yen, Mark D. Hill, Ben Liblit, Michael M. Swift, and David A.Wood. Supporting nested transactional memory in logtm. In ASPLOS 12, pages 359--370, October 2006. Google ScholarDigital Library
- J. Eliot B. Moss. Open nested transactions: Semantics and support. In Workshop on Memory Performance Issues, February 2006.Google Scholar
- Yang Ni, Adam Welc, Ali-Reza Adl-Tabatabai, Moshe Bach, Sion Berkowits, James Cownie, Robert Geva, Sergey Kozhukow, Ravi Narayanaswamy, Jeffrey Olivier, Serguei Preis, Bratin Saha, Ady Tal, and Xinmin Tian. Design and implementation of transactional constructs for c/c++. In OOPSLA 23, June 2008. Google ScholarDigital Library
- Edmund B. Nightingale, Peter M. Chen, and Jason Flinn. Speculative execution in a distributed file system. In SOSP 20, pages 191--205, October 2005. Google ScholarDigital Library
- Marek Olszewski, Jeremy Cutler, and J. Gregory Steffan. Judostm: A dynamic binary--rewriting approach to software transactional memory. In PACT 2007, September 2007. Google ScholarDigital Library
- Oracle Corporation. Oracle Berkeley Database. http://www.oracle.com/database/berkeley-db/index.html.Google Scholar
- Christopher J. Rossbach, Owen S. Hofmann, Donald E. Porter, Hany E. Ramadan, Aditya Bhandari, and Emmett Witchel. TxLinux: Using and managing hardware transactional memory in an operating system. In SOSP 21, October 2007. Google ScholarDigital Library
- Bratin Saha, Ali-Reza Adl-Tabatabai, Richard L. Hudson, Chi Cao Minh, and Benjamin Hertzberg. Mcrt-stm: a high performance software transactional memory system for a multi-core runtime. In PPOPP 13, March 2006. Google ScholarDigital Library
- Bratin Saha, Ali-Reza Adl-Tabatabai, and Quinn Jacobson. Architectural support for software transactional memory. In MICRO 39, December 2006. Google ScholarDigital Library
- Chris Schlaeger. The impact of operating systems on modern CPU designs (and vice versa). http://arcs08.inf.tu-dresden.de/docs/arcs08 schlaeger-sld.pdf,February 2008.Google Scholar
- Y. Smaragdakis, A. Kay, R. Behrends, and M. Young. Transactions with isolation and cooperation. In OOPSLA 22, October 2007. Google ScholarDigital Library
- Michael F. Spear, Maged M. Michael, and Michael L. Scott. Inevitability mechanisms for software transactional memory. In TRANSACT 3, February 2008.Google Scholar
- Thomas Strandenæs and Randi Karlsen. Transaction compensation in web services. In Norsk Informatikkonferanse, June 2002.Google Scholar
- Herb Sutter and James Larus. Software and the concurrency revolution. ACM Queue, 3(7), September 2005. Google ScholarDigital Library
- Michael M. Swift, Haris Volos, Neelam Goyal, Luke Yen, Mark D. Hill, and David A.Wood. OS support for virtualizing hardware transactional memory. In TRANSACT 3, February 2008.Google Scholar
- Marc Tremblay and Shailender Chaudhry. A third-generation 65nm 16-core 32-thread plus 32-scout-thread cmt sparc processor. In ISSCC 2008 Conference Proceedings, February 2008.Google ScholarCross Ref
- Haris Volos, Neelam Goyal, and Michael M. Swift. Pathological interaction of locks with transactional memory. In TRANSACT 3, February 2008.Google Scholar
- Cheng Wang, Wei-Yu Chen, Youfeng Wu, Bratin Saha, and Ali-Reza Adl-Tabatabai. Code generation and optimization for transactional memory constructs in an unmanaged language. In CGO 2007, March 2007. Google ScholarDigital Library
- Yin Wang, Terence Kelly, Manjunath Kudlur, Stephane Lafortune, and Scott Mahlke. Gadara: Dynamic deadlock avoidance for multithreaded programs. In OSDI 8, November 2008. Google ScholarDigital Library
- Adam Welc, Bratin Saha, and Ali-Reza Adl-Tabatabai. Irrevocable transactions and their applications. In SPAA 2008, pages 285--296, October 2008. Google ScholarDigital Library
- xiph.com. Ogg Vorbis documentation. http://www.xiph.org/vorbis/doc/.Google Scholar
- xmms.org. X Multimedia System. www.xmms.org.Google Scholar
- Luke Yen, Jayaram Bobba, Michael R. Marty, Kevin E. Moore, Haris Volos, Mark D. Hill, Michael M. Swift, and David A. Wood. LogTM-SE: Decoupling hardware transactional memory from caches. In HPCA 13, pages 261--272, February 2007. Google ScholarDigital Library
- Craig Zilles and Lee Baugh. Extending hardware transactional memory to support non-busy waiting and nontransactional actions. In TRANSACT 1, June 2006.Google Scholar
Index Terms
- xCalls: safe I/O in memory transactions
Recommendations
TM-dietlibc: A TM-aware Real-World System Library
IPDPS '13: Proceedings of the 2013 IEEE 27th International Symposium on Parallel and Distributed ProcessingThe simplicity of concurrent programming with Transactional Memory (TM) and its recent implementation in mainstream processors greatly motivates researchers and industry to investigate this field and propose new implementations and optimizations. ...
Relaxed Concurrency Control in Software Transactional Memory
Some of today's TM systems implement the two-phase-locking (2PL) algorithm which aborts transactions every time a conflict occurs. 2PL is a simple algorithm that provides fast transactional operations. However, it limits concurrency in benchmarks with ...
Comments