Software transactional memory vs. locking in a functional language: a controlled experiment

  • Authors:
  • Fernando Castor;João Paulo Oliveira;André L.M. Santos

  • Affiliations:
  • Federal University of Pernambuco, Recife, Brazil;Federal University of Pernambuco, Recife, Brazil;Federal University of Pernambuco, Recife, Brazil

  • Venue:
  • Proceedings of the compilation of the co-located workshops on DSM'11, TMC'11, AGERE!'11, AOOPES'11, NEAT'11, & VMIL'11
  • Year:
  • 2011

Quantified Score

Hi-index 0.00

Visualization

Abstract

Many researchers believe that software transactional memory (STM) will play an important role in the transition to multicore systems. However, little effort has been placed on assessing whether STM delivers on its promises of avoiding common concurrent/parallel programming pitfalls. In this paper, we describe a controlled experiment aiming to evaluate the ease of using STM. The study targets Haskell, a purely functional programming language that includes a mature implementation of STM. It compares the use of STM and Haskell's lock-based concurrency control mechanism to develop a program with (coarse-grained) mutual exclusion and synchronization requirements. We organized the 51 subjects in two groups, one for each technique. We found out that the two techniques did not differ significantly in terms of concurrency errors, number of LoC and time to develop the resulting programs. However, for programs where developers made only non-concurrency-related mistakes, STM programmers finished their assignments quicker.