Practical weak-atomicity semantics for java stm

As memory transactions have been proposed as a language-level replacement for locks, there is growing need for well-defined semantics. In contrast to database transactions, transaction memory (TM) semantics are complicated by the fact that programs may access the same memory locations both inside and outside transactions. Strongly atomic semantics, where non transactional accesses are treated as implicit single-operation transactions, remain difficult to provide without specialized hardware support or significant performance overhead. As an alternative, many in the community have informally proposed that a single global lock semantics [18,10], where transaction semantics are mapped to those of regions protected by a single global lock, provide an intuitive and efficiently implementable model for programmers. In this paper, we explore the implementation and performance implications of single global lock semantics in a weakly atomic STM from the perspective of Java, and we discuss why even recent STM implementations fall short of these semantics. We describe a new weakly atomic Java STM implementation that provides single global lock semantics while permitting concurrent execution, but we show that this comes at a significant performance cost. We also propose and implement various alternative semantics that loosen single lock requirements while still providing strong guarantees. We compare our new implementations to previous ones, including a strongly atomic STM.[24]

[1]  David A. Wood,et al.  LogTM: log-based transactional memory , 2006, The Twelfth International Symposium on High-Performance Computer Architecture, 2006..

[2]  Ali-Reza Adl-Tabatabai,et al.  McRT-Malloc: a scalable transactional memory allocator , 2006, ISMM '06.

[3]  Jeremy Manson,et al.  The Java memory model , 2005, POPL '05.

[4]  Maurice Herlihy,et al.  Virtualizing transactional memory , 2005, 32nd International Symposium on Computer Architecture (ISCA'05).

[5]  Dan Grossman,et al.  What do high-level memory models mean for transactions? , 2006, MSPC '06.

[6]  Andreas Reuter,et al.  Transaction Processing: Concepts and Techniques , 1992 .

[7]  Dan Grossman,et al.  Enforcing isolation and ordering in STM , 2007, PLDI '07.

[8]  Michael F. Spear,et al.  Brief Announcement : Privatization Techniques for Software Transactional Memory , 2007 .

[9]  Milo M. K. Martin,et al.  Deconstructing transactions: The subtleties of atomicity , 2005 .

[10]  Michael F. Spear,et al.  Privatization techniques for software transactional memory , 2007, PODC '07.

[11]  Leslie Lamport,et al.  How to Make a Multiprocessor Computer That Correctly Executes Multiprocess Programs , 2016, IEEE Transactions on Computers.

[12]  Richard L. Hudson,et al.  Towards a Lock-based Semantics for Java STM , 2007 .

[13]  James R. Larus,et al.  Transactional Memory , 2006, Transactional Memory.

[14]  Mark Plesko,et al.  Optimizing memory transactions , 2006, PLDI '06.

[15]  Leslie Lamport,et al.  Prism: A Principle-Based Sequential Memory Model for Microsoft Native Code Platforms , 2006 .

[16]  Dan Grossman,et al.  High-level small-step operational semantics for transactions , 2008, POPL '08.

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

[18]  Kunle Olukotun,et al.  Transactional memory coherence and consistency , 2004, Proceedings. 31st Annual International Symposium on Computer Architecture, 2004..

[19]  Bradley C. Kuszmaul,et al.  Unbounded transactional memory , 2005, 11th International Symposium on High-Performance Computer Architecture.

[20]  Nir Shavit,et al.  Transactional Locking II , 2006, DISC.

[21]  Simon L. Peyton Jones,et al.  Composable memory transactions , 2005, CACM.

[22]  Sarita V. Adve,et al.  Shared Memory Consistency Models: A Tutorial , 1996, Computer.

[23]  Brian T. Lewis,et al.  Compiler and runtime support for efficient software transactional memory , 2006, PLDI '06.

[24]  Bratin Saha,et al.  Code Generation and Optimization for Transactional Memory Constructs in an Unmanaged Language , 2007, International Symposium on Code Generation and Optimization (CGO'07).

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