A study of transactional memory vs. locks in practice
Authors:
Open Access
- 4 June 2011
- conference paper
- Published by Association for Computing Machinery (ACM)
- p. 43-52
Abstract
Transactional Memory (TM) promises to simplify parallel programming by replacing locks with atomic transactions. Despite much recent progress in TM research, there is very little experience using TM to develop realistic parallel programs from scratch. In this paper, we present the results of a detailed case study comparing teams of programmers developing a parallel program from scratch using transactional memory and locks. We analyze and quantify in a realistic environment the development time, programming progress, code metrics, programming patterns, and ease of code understanding for six teams who each wrote a parallel desktop search engine over a fifteen week period. Three randomly chosen teams used Intel's Software Transactional Memory compiler and Pthreads, while the other teams used just Pthreads. Our analysis is exploratory: Given the same requirements, how far did each team get? The TM teams were among the first to have a prototype parallel search engine. Compared to the locks teams, the TM teams spent less than half the time debugging segmentation faults, but had more problems tuning performance and implementing queries. Code inspections with industry experts revealed that TM code was easier to understand than locks code, because the locks teams used many locks (up to thousands) to improve performance. Learning from each team's individual success and failure story, this paper provides valuable lessons for improving TM.Keywords
This publication has 21 references indexed in Scilit:
- Guidelines for conducting and reporting case study research in software engineeringEmpirical Software Engineering, 2008
- Software transactional memoryCommunications of the ACM, 2008
- Efficient online index construction for text databasesACM Transactions on Database Systems, 2008
- Lee-TM: A Non-trivial Benchmark Suite for Transactional Memory2008
- STMBench7ACM SIGOPS Operating Systems Review, 2007
- Compiler and runtime support for efficient software transactional memory2006
- Hybrid transactional memory2006
- McRT-STM2006
- AtomCaml2005
- Burst triesACM Transactions on Information Systems, 2002