Theory of Computing Systems

, Volume 55, Issue 3, pp 555–590

Software Engineering with Transactional Memory Versus Locks in Practice

Article

DOI: 10.1007/s00224-013-9452-5

Cite this article as:
Pankratius, V. & Adl-Tabatabai, AR. Theory Comput Syst (2014) 55: 555. doi:10.1007/s00224-013-9452-5

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 article, 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 article provides valuable lessons for improving TM.

Keywords

Parallel programming Transactional memory Language design Human factors Synchronization Programming techniques 

Copyright information

© Springer Science+Business Media New York 2013

Authors and Affiliations

  1. 1.Massachusetts Institute of TechnologyCambridgeUSA
  2. 2.Programming Systems LabIntel CorporationSanta ClaraUSA

Personalised recommendations