skip to main content
10.1145/1519065.1519093acmconferencesArticle/Chapter ViewAbstractPublication PageseurosysConference Proceedingsconference-collections
research-article

xCalls: safe I/O in memory transactions

Published:01 April 2009Publication History

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%.

References

  1. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  2. 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 ScholarGoogle Scholar
  3. Andrew D. Birrell and Michael Isard. Automatic mutual exclusion. In HotOS 11, May 2007.Google ScholarGoogle Scholar
  4. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  5. Bryan Cantrill. Concurrency's shysters. http://blogs.sun.com/bmc/entry/concurrency_s_shysters, November 2008.Google ScholarGoogle Scholar
  6. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  7. Peter Damron, Alexandra Fedorova, Yossi Lev, Victor Luchango, Mark Moir, and Daniel Nussbaum. Hybrid transactional memory. In ASPLOS 12, October 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Dave Dice, Ori Shalev, and Nir Shavit. Transactional locking ii. In DISC 20, September 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Polina Dudnik and Michael M. Swift. Condition variables and transactional memory: Problem or opportunity? In TRANSACT 4, February 2009.Google ScholarGoogle Scholar
  10. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  11. Christof Fetzer and Pascal Felber. Improving program correctness with atomic exception handling. Journal of Universal Computer Science, 13(8):1047--1072, 2007.Google ScholarGoogle Scholar
  12. Richard M. Fujimoto. The virtual time machine. In Proceedings of the First ACM Symposium on Parallel Algorithms and Architectures, June 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Jim Gray and Andreas Reuter. Transaction Processing:Concepts and Techniques. Morgan Kaufmann, 1993. ISBN 1-55860-190-2. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  15. Tim Harris. Exceptions and side-effects in atomic blocks. In PODC Workshop on Concurrency and Synchronization in Java Programs, Jul 2004.Google ScholarGoogle Scholar
  16. Tim Harris and Keir Fraser. Language support for lightweight transactions. In OOPSLA 18, October 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Tim Harris, Simon Marlow, Simon Peyton Jones, and Maurice Herlihy. Composable memory transactions. In PPOPP 12, June 1991.Google ScholarGoogle Scholar
  18. Tim Harris, Mark Plesko, Avraham Shinnar, and David Tarditi. Optimizing memory transactions. In PLDI 2006, June 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Roger Haskin, Yoni Malachi, Wayne Sawdon, and Gregory Chan. Recovery management in quicksilver. In SOSP 11, pages 107--108, November 1987. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. 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 ScholarGoogle Scholar
  21. Intel. Intel c++ stm compiler prototype edition 2.0 language extensions and user's guide. Technical Report 318253-001US, Intel Corp., April 2008.Google ScholarGoogle Scholar
  22. Internet Systems Consortium. Berkeley internet name domain (BIND). http://www.isc.org/index.pl?/sw/bind/.Google ScholarGoogle Scholar
  23. David R. Jefferson. Virtual time. ACM Transactions on Programming Languages and Systems, 7(3):404--425, 1985. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Tatuya Jinmei and Paul Vixie. Implementation and evaluation of moderate parallelism in the BIND9 DNS server. In Usenix ATC 2006, June 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Horatiu Jula, Daniel Tralamazza, Cristian Zamfir, and George Candea. Deadlock immunity: Enabling systems to defend against deadlocks. In OSDI 8, November 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. David E. Lowell and Peter M. Chen. Persistent messages in local transactions. In PODC 17, pages 219--226, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  28. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  29. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  30. Microsoft Corp. Transactional memory team blog. http://blogs.msdn.com/stmteam/default.aspx, October 2008.Google ScholarGoogle Scholar
  31. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  32. 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 ScholarGoogle ScholarCross RefCross Ref
  33. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  34. J. Eliot B. Moss. Open nested transactions: Semantics and support. In Workshop on Memory Performance Issues, February 2006.Google ScholarGoogle Scholar
  35. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  36. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  37. Marek Olszewski, Jeremy Cutler, and J. Gregory Steffan. Judostm: A dynamic binary--rewriting approach to software transactional memory. In PACT 2007, September 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. Oracle Corporation. Oracle Berkeley Database. http://www.oracle.com/database/berkeley-db/index.html.Google ScholarGoogle Scholar
  39. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  40. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  41. Bratin Saha, Ali-Reza Adl-Tabatabai, and Quinn Jacobson. Architectural support for software transactional memory. In MICRO 39, December 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. 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 ScholarGoogle Scholar
  43. Y. Smaragdakis, A. Kay, R. Behrends, and M. Young. Transactions with isolation and cooperation. In OOPSLA 22, October 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  44. Michael F. Spear, Maged M. Michael, and Michael L. Scott. Inevitability mechanisms for software transactional memory. In TRANSACT 3, February 2008.Google ScholarGoogle Scholar
  45. Thomas Strandenæs and Randi Karlsen. Transaction compensation in web services. In Norsk Informatikkonferanse, June 2002.Google ScholarGoogle Scholar
  46. Herb Sutter and James Larus. Software and the concurrency revolution. ACM Queue, 3(7), September 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  47. 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 ScholarGoogle Scholar
  48. 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 ScholarGoogle ScholarCross RefCross Ref
  49. Haris Volos, Neelam Goyal, and Michael M. Swift. Pathological interaction of locks with transactional memory. In TRANSACT 3, February 2008.Google ScholarGoogle Scholar
  50. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  51. Yin Wang, Terence Kelly, Manjunath Kudlur, Stephane Lafortune, and Scott Mahlke. Gadara: Dynamic deadlock avoidance for multithreaded programs. In OSDI 8, November 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  52. Adam Welc, Bratin Saha, and Ali-Reza Adl-Tabatabai. Irrevocable transactions and their applications. In SPAA 2008, pages 285--296, October 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  53. xiph.com. Ogg Vorbis documentation. http://www.xiph.org/vorbis/doc/.Google ScholarGoogle Scholar
  54. xmms.org. X Multimedia System. www.xmms.org.Google ScholarGoogle Scholar
  55. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  56. Craig Zilles and Lee Baugh. Extending hardware transactional memory to support non-busy waiting and nontransactional actions. In TRANSACT 1, June 2006.Google ScholarGoogle Scholar

Index Terms

  1. xCalls: safe I/O in memory transactions

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
  • Published in

    cover image ACM Conferences
    EuroSys '09: Proceedings of the 4th ACM European conference on Computer systems
    April 2009
    342 pages
    ISBN:9781605584829
    DOI:10.1145/1519065

    Copyright © 2009 ACM

    Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    • Published: 1 April 2009

    Permissions

    Request permissions about this article.

    Request Permissions

    Check for updates

    Qualifiers

    • research-article

    Acceptance Rates

    Overall Acceptance Rate241of1,308submissions,18%

PDF Format

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader