Software transactional memories for Scala

Transactional memory is an alternative to locks for handling concurrency in multi-threaded environments. Instead of providing critical regions that only one thread can enter at a time, transactional memory records sufficient information to detect and correct for conflicts if they occur. This paper surveys the range of options for implementing software transactional memory in Scala. Where possible, we provide references to implementations that instantiate each technique. As part of this survey, we document for the first time several techniques developed in the implementation of Manchester University Transactions for Scala. We order the implementation techniques on a scale moving from the least to the most invasive in terms of modifications to the compilation and runtime environment. This shows that, while the less invasive options are easier to implement and more common, they are more verbose and invasive in the codes using them, often requiring changes to the syntax and program structure throughout the code.

[1]  C. Thomas Wu An Introduction to Object-Oriented Programming With Java , 1998 .

[2]  Kunle Olukotun,et al.  CCSTM: A Library-Based STM for Scala , 2010 .

[3]  Richard S. Bird,et al.  Introduction to functional programming using haskeu , 1998 .

[4]  Salman Khan,et al.  MUTS: Native Scala Constructs for Software Transactional Memory , 2011 .

[5]  Keir Fraser,et al.  Language support for lightweight transactions , 2003, SIGP.

[6]  Richard S. Bird,et al.  Introduction to functional programming , 1988, Prentice Hall International series in computer science.

[7]  Dan Grossman,et al.  ASF: AMD64 Extension for Lock-Free Data Structures and Transactional Memory , 2010, 2010 43rd Annual IEEE/ACM International Symposium on Microarchitecture.

[8]  James R. Larus,et al.  Transactional memory , 2008, CACM.

[9]  Ruud Haring,et al.  The Blue Gene/Q Compute chip , 2011, 2011 IEEE Hot Chips 23 Symposium (HCS).

[10]  Nir Shavit,et al.  Noninvasive concurrency with Java STM , 2009 .

[11]  Martin Odersky,et al.  Programming in Scala: A Comprehensive Step-by-Step Guide, 2nd Edition , 2010 .

[12]  Torvald Riegel,et al.  Dynamic performance tuning of word-based software transactional memory , 2008, PPoPP.

[13]  Nir Shavit,et al.  Software transactional memory , 1995, PODC '95.

[14]  Norman P. Jouppi,et al.  Synthesis Lectures on Computer Architecture , 2011 .

[15]  Håkan Grahn,et al.  Transactional memory , 2010, J. Parallel Distributed Comput..

[16]  Mark Moir,et al.  Hybrid transactional memory , 2006, ASPLOS XII.

[17]  Frank Yellin,et al.  The Java Virtual Machine Specification , 1996 .