A comprehensive strategy for contention management in software transactional memory

In Software Transactional Memory (STM), contention management refers to the mechanisms used to ensure forward progress--to avoid livelock and starvation, and to promote throughput and fairness. Unfortunately, most past approaches to contention management were designed for obstruction-free STM frameworks, and impose significant constant-time overheads. Priority-based approaches in particular typically require that reads be visible to all transactions, an expensive property that is not easy to support in most STM systems. In this paper we present a comprehensive strategy for contention management via fair resolution of conflicts in an STM with invisible reads. Our strategy depends on (1) lazy acquisition of ownership, (2) extendable timestamps, and (3) an efficient way to capture both priority and conflicts. We introduce two mechanisms--one using Bloom filters, the other using visible read bits--that implement point (3). These mechanisms unify the notions of conflict resolution, inevitability, and transaction retry. They are orthogonal to the rest of the contention management strategy, and could be used in a wide variety of hardware and software TM systems. Experimental evaluation demonstrates that the overhead of the mechanisms is low, particularly when conflicts are rare, and that our strategy as a whole provides good throughput and fairness, including livelock and starvation freedom, even for challenging workloads.

[1]  Justin Emile Gottschlich,et al.  Extending Contention Managers for User-Defined Priority-Based Transactions , 2008 .

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

[3]  Marek Olszewski,et al.  JudoSTM: A Dynamic Binary-Rewriting Approach to Software Transactional Memory , 2007, 16th International Conference on Parallel Architecture and Compilation Techniques (PACT 2007).

[4]  Adam Welc,et al.  Practical weak-atomicity semantics for java stm , 2008, SPAA '08.

[5]  David A. Wood,et al.  Performance Pathologies in Hardware Transactional Memory , 2007, IEEE Micro.

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

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

[8]  David Eisenstat,et al.  Lowering the Overhead of Software Transactional Memory , 2006 .

[9]  Michael F. Spear,et al.  Conflict Detection and Validation Strategies for Software Transactional Memory , 2006, DISC.

[10]  Maged M. Michael,et al.  Inevitability Mechanisms for Software Transactional Memory , 2008 .

[11]  Torvald Riegel,et al.  Time-based transactional memory with scalable time bases , 2007, SPAA '07.

[12]  Maurice Herlihy,et al.  Software transactional memory for dynamic-sized data structures , 2003, PODC '03.

[13]  Michael F. Spear,et al.  Transactional memory retry mechanisms , 2008, PODC '08.

[14]  Yannis Smaragdakis,et al.  Transactions with isolation and cooperation , 2007, OOPSLA.

[15]  Rachid Guerraoui,et al.  Dividing Transactional Memories by Zero , 2008 .

[16]  William N. Scherer,et al.  Advanced contention management for dynamic software transactional memory , 2005, PODC '05.

[17]  Maged M. Michael,et al.  RingSTM: scalable transactions with a single atomic instruction , 2008, SPAA '08.

[18]  Craig B. Zilles,et al.  Transactional memory and the birthday paradox , 2007, SPAA '07.

[19]  Burton H. Bloom,et al.  Space/time trade-offs in hash coding with allowable errors , 1970, CACM.

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

[21]  Martín Abadi,et al.  Semantics of transactional memory and automatic mutual exclusion , 2011, TOPL.

[22]  Adam Welc,et al.  Irrevocable transactions and their applications , 2008, SPAA '08.

[23]  Rachid Guerraoui,et al.  Toward a theory of transactional contention managers , 2005, PODC '05.

[24]  Michael F. Spear,et al.  Ordering-Based Semantics for Software Transactional Memory , 2008, OPODIS.

[25]  Maged M. Michael,et al.  Implementing and Exploiting Inevitability in Software Transactional Memory , 2008, 2008 37th International Conference on Parallel Processing.