ABSTRACT
Chip multi-processors (CMPs) have become ubiquitous, while tools that ease concurrent programming have not. The promise of increased performance for all applications through ever more parallel hardware requires good tools for concurrent programming, especially for average programmers. Transactional memory (TM) has enjoyed recent interest as a tool that can help programmers program concurrently.
The transactional memory (TM) research community is heavily invested in the claim that programming with transactional memory is easier than alternatives (like locks), but evidence for or against the veracity of this claim is scant. In this paper, we describe a user-study in which 237 undergraduate students in an operating systems course implement the same programs using coarse and fine-grain locks, monitors, and transactions. We surveyed the students after the assignment, and examined their code to determine the types and frequency of programming errors for each synchronization technique. Inexperienced programmers found baroque syntax a barrier to entry for transactional programming. On average, subjective evaluation showed that students found transactions harder to use than coarse-grain locks, but slightly easier to use than fine-grained locks. Detailed examination of synchronization errors in the students' code tells a rather different story. Overwhelmingly, the number and types of programming errors the students made was much lower for transactions than for locks. On a similar programming problem, over 70% of students made errors with fine-grained locking, while less than 10% made errors with transactions.
- Cyvis Software Complexity Visualizer, 2009.Google Scholar
- Sync-gallery survey: http://www.cs.utexas.edu/users/witchel/tx/syncgallery-survey.html, 2009.Google Scholar
- Sync-gallery survey: http://www.cs.utexas.edu/users/witchel/tx/sync-gallery-survey.html, 2009.Google Scholar
- Ali-Reza Adl-Tabatabai, Brian T. Lewis, Vijay Menon, Brian R. Murphy, Bratin Saha, and Tatiana Shpeisman. Compiler and runtime support for efficient software transactional memory. In PLDI '06: Proceedings of the 2006 ACMSIGPLAN conference on Programming language design and implementation, pages 26--37, New York, NY, USA, 2006. ACM. Google Scholar
Digital Library
- Lee Baugh, Naveen Neelakantam, and Craig Zilles. Using hardware memory protection to build a high-performance, strongly-atomic hybrid transactional memory. SIGARCH Comput. Archit. News, 36(3):115--126, 2008. Google Scholar
Digital Library
- 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. SIGARCH Comput. Archit. News, 35(2):24--34, 2007. Google Scholar
Digital Library
- Jayaram Bobba, Neelam Goyal, Mark D. Hill, Michael M. Swift, and David A. Wood. Tokentm: Efficient execution of large transactions with hardware transactional memory. SIGARCH Comput. Archit. News, 36(3):127--138, 2008. Google Scholar
Digital Library
- JaeWoong Chung, Chi Cao Minh, Austen McDonald, Travis Skare, Hassan Chafi, Brian D. Carlstrom, Christos Kozyrakis, and Kunle Olukotun. Tradeoffs in transactional memory virtualization. SIGPLAN Not., 41(11):371--381, 2006. Google Scholar
Digital Library
- Luke Dalessandro, Virendra J. Marathe, Michael F. Spear, and Michael L. Scott. Capabilities and limitations of library-based software transactional memory in c++. In Proceedings of the 2nd ACM SIGPLAN Workshop on Transactional Computing. Portland, OR, Aug 2007.Google Scholar
- D. Dice, O. Shalev, and N. Shavit. Transactional locking II. In DISC, 2006.Google Scholar
Digital Library
- Dave Dice, Yossi Lev,MarkMoir, and Daniel Nussbaum. Early experience with a commercial hardware transactional memory implementation. SIGPLAN Not., 44(3):157--168, 2009. Google Scholar
Digital Library
- L. Hammond, V. Wong, M. Chen, B. Hertzberg, B. Carlstrom, M. Prabhu, H. Wijaya, C. Kozyrakis, and K. Olukotun. Transactional memory coherence and consistency. In ISCA, 2004. Google Scholar
Digital Library
- Tim Harris and Keir Fraser. Language support for lightweight transactions. In OOPSLA '03: Proceedings of the 18th annual ACM SIGPLAN conference on Object-oriented programing, systems, languages, and applications, pages 388--402, New York, NY, USA, 2003. ACM. Google Scholar
Digital Library
- Tim Harris, Mark Plesko, Avraham Shinnar, and David Tarditi. Optimizing memory transactions. In PLDI '06: Proceedings of the 2006 ACM SIGPLAN conference on Programming language design and implementation, pages 14--25, New York, NY, USA, 2006. ACM. Google Scholar
Digital Library
- Maurice Herlihy, Victor Luchangco, and Mark Moir. A flexible framework for implementing software transactional memory. In OOPSLA '06: Proceedings of the 21st annual ACM SIGPLAN conference on Object-oriented programming systems, languages, and applications, pages 253--262, New York, NY, USA, 2006. ACM. Google Scholar
Digital Library
- Maurice Herlihy and J. Eliot B. Moss. Transactional memory: architectural support for lock-free data structures. SIGARCH Comput. Archit. News, 21(2):289--300, 1993. Google Scholar
Digital Library
- Owen S. Hofmann, Christopher J. Rossbach, and Emmett Witchel. Maximum benefit from a minimal htm. In ASPLOS '09: Proceeding of the 14th international conference on Architectural support for programming languages and operating systems, pages 145--156, New York, NY, USA, 2009. ACM. Google Scholar
Digital Library
- Yossi Lev and Jan-Willem Maessen. Split hardware transactions: true nesting of transactions using best-effort hardware transactional memory. In PPoPP '08: Proceedings of the 13th ACM SIGPLAN Symposium on Principles and practice of parallel programming, pages 197--206, New York, NY, USA, 2008. ACM. Google Scholar
Digital Library
- Yossi Lev, Mark Moir, and Dan Nussbaum. PhTM: Phased transactional memory. In Workshop on Transactional Computing (TRANSACT), 2007.Google Scholar
- Virendra J. Marathe, Michael F. Spear, Christopher Heriot, Athul Acharya, David Eisenstat, William N. Scherer III, and Michael L. Scott. Lowering the overhead of software transactional memory. Technical Report TR 893, Computer Science Department, University of Rochester, Mar 2006. Condensed version submitted for publication.Google Scholar
- T. J. McCabe. A complexity measure. IEEE Trans. Softw. Eng., 2(4):308--320, 1976. Google Scholar
Digital Library
- Austen McDonald, JaeWoong Chung, Brian D. Carlstrom, Chi Cao Minh, Hassan Chafi, Christos Kozyrakis, and Kunle Olukotun. Architectural semantics for practical transactional memory. SIGARCH Comput. Archit. News, 34(2):53--65, 2006. Google Scholar
Digital Library
- Kevin E. Moore, Jayaram Bobba, Michelle J. Moravan, Mark D. Hill, and David A. Wood. Logtm: Log-based transactional memory. In Proceedings of the 12th International Symposium on High-Performance Computer Architecture, pages 254--265. Feb 2006.Google Scholar
Digital Library
- 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 '08: Proceedings of the 23rd ACM SIGPLAN conference on Object-oriented programming systems languages and applications, pages 195--212, New York, NY, USA, 2008. ACM. Google Scholar
Digital Library
- Victor Pankratius, Ali-Reza Adl-Tabatabai, and Frank Otto. Does transactional memory keep its promises? results from and empirical study. publication, September 2009.Google Scholar
- Ravi Rajwar, Maurice Herlihy, and Konrad Lai. Virtualizing transactional memory. In ISCA '05: Proceedings of the 32nd annual international symposium on Computer Architecture, pages 494--505,Washington, DC, USA, 2005. IEEE Computer Society. Google Scholar
Digital Library
- Hany E. Ramadan, Christopher J. Rossbach, Donald E. Porter, Owen S. Hofmann, Aditya Bhandari, and Emmett Witchel. Metatm/txlinux: transactional memory for an operating system. In ISCA '07: Proceedings of the 34th annual international symposium on Computer architecture, pages 92--103, New York, NY, USA, 2007. ACM. Google Scholar
Digital Library
- Hany E. Ramadan, Christopher J. Rossbach, and Emmett Witchel. Dependence-aware transactional memory for increased concurrency. InMICRO '08: Proceedings of the 2008 41st IEEE/ACMInternational Symposium on Microarchitecture, pages 246--257, Washington, DC, USA, 2008. IEEE Computer Society. Google Scholar
Digital Library
- Hany E. Ramadan, Indrajit Roy, Maurice Herlihy, and Emmett Witchel. Committing conflicting transactions in an stm. In PPoPP'09: Proceedings of the 14th ACMSIGPLAN symposium on Principles and practice of parallel programming, pages 163--172, New York, NY, USA, 2009. ACM. Google Scholar
Digital Library
- Christopher Rossbach, Owen Hofmann, and Emmett Witchel. Is transactional memory programming actually easier? In WDDD '09: Proc. 8th Workshop on Duplicating, Deconstructing, and Debunking, jun 2009.Google Scholar
- Nir Shavit and Dan Touitou. Software transactional memory. In Proceedings of the 14th ACM Symposium on Principles of Distributed Computing, pages 204--213, Aug 1995. Google Scholar
Digital Library
- Arrvindh Shriraman, Sandhya Dwarkadas, and Michael L. Scott. Flexible decoupled transactional memory support. In Proceedings of the 35th Annual International Symposium on Computer Architecture. Jun 2008. Google Scholar
Digital Library
- Fuad Tabba, Cong Wang, James R. Goodman, and Mark Moir. NZTM: Nonblocking, zero-indirection transactional memory. In Workshop on Transactional Computing (TRANSACT), 2007.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 '07: Proceedings of the 2007 IEEE 13th International Symposium on High Performance Computer Architecture, pages 261--272, Washington, DC, USA, 2007. IEEE Computer Society. Google Scholar
Digital Library
Index Terms
Is transactional programming actually easier?
Recommendations
Is transactional programming actually easier?
PPoPP '10Chip multi-processors (CMPs) have become ubiquitous, while tools that ease concurrent programming have not. The promise of increased performance for all applications through ever more parallel hardware requires good tools for concurrent programming, ...
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 ...
TxLinux: using and managing hardware transactional memory in an operating system
SOSP '07: Proceedings of twenty-first ACM SIGOPS symposium on Operating systems principlesTxLinux 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