The Future(s) of Transactional Memory

This work investigates how to combine two powerful abstractions to manage concurrent programming: Transactional Memory (TM) and futures. The former hides from programmers the complexity of synchronizing concurrent access to shared data, via the familiar abstraction of atomic transactions. The latter serves to schedule and synchronize the parallel execution of computations whose results are not immediately required. While TM and futures are two widely investigated topics, the problem of how to exploit these two abstractions in synergy is still largely unexplored in the literature. This paper fills this gap by introducing Java Transactional Futures (JTF), a Java-based TM implementation that allows programmers to use futures to coordinate the execution of parallel tasks, while leveraging transactions to synchronize accesses to shared data. JTF provides a simple and intuitive semantic regarding the admissible serialization orders of the futures spawned by transactions, by ensuring that the results produced by a future are always consistent with those that one would obtain by executing the future sequentially. Our experimental results show that the use of futures in a TM allows not only to unlock parallelism within transactions, but also to reduce the cost of conflicts among top-level transactions in high contention workloads.

[1]  Maurice Herlihy,et al.  Transactional Memory: Architectural Support For Lock-free Data Structures , 1993, Proceedings of the 20th Annual International Symposium on Computer Architecture.

[2]  João P. Cachopo,et al.  Practical Parallel Nesting for Software Transactional Memory , 2013, DISC.

[3]  Maurice Herlihy,et al.  The future(s) of shared data structures , 2014, PODC '14.

[4]  Rachid Guerraoui,et al.  Leveraging parallel nesting in transactional memory , 2010, PPoPP '10.

[5]  João P. Cachopo,et al.  Lock-free and scalable multi-version software transactional memory , 2011, PPoPP '11.

[6]  Suresh Jagannathan,et al.  Safe futures for Java , 2005, OOPSLA '05.

[7]  Philip A. Bernstein,et al.  Categories and Subject Descriptors: H.2.4 [Database Management]: Systems. , 2022 .

[8]  Kunle Olukotun,et al.  STAMP: Stanford Transactional Applications for Multi-Processing , 2008, 2008 IEEE International Symposium on Workload Characterization.

[9]  Carl Hewitt,et al.  The incremental garbage collection of processes , 1977 .

[10]  Robert H. Halstead,et al.  MULTILISP: a language for concurrent symbolic computation , 1985, TOPL.

[11]  K. Vidyasankar,et al.  HParSTM: A Hierarchy-based STM Protocol for Supporting Nested Parallelism , 2011 .

[12]  João P. Cachopo,et al.  Improving Continuation-Powered Method-Level Speculation for JVM Applications , 2013, ICA3PP.

[13]  Virendra J. Marathe,et al.  A Qualitative Survey of Modern Software Transactional Memory Systems , 2004 .

[14]  Jeremy T. Fineman,et al.  Nested parallelism in transactional memory , 2008, PPoPP.

[15]  Rachid Guerraoui,et al.  Opacity: A Correctness Condition for Transactional Memory , 2007 .

[16]  Kunle Olukotun,et al.  Data speculation support for a chip multiprocessor , 1998, ASPLOS VIII.

[17]  Adam Welc,et al.  NePalTM: design and implementation of nested parallelism for transactional memory systems , 2009, PPoPP '09.

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

[19]  Carl Hewitt,et al.  The incremental garbage collection of processes , 1977, Artificial Intelligence and Programming Languages.

[20]  Seif Haridi,et al.  In Search of Semantic Models for Reconciling Futures and Transactional Memory , 2015 .