Purge-Rehab: Eager Software Transactional Memory with High Performance Under Contention

Transactional memory is a programming model that attempts to make parallel programming easier. Transactional memory uses either eager (at encounter time) or lazy (at commit time) validation to check for conflicting accesses between concurrent transactions, and researchers have been divided over which approach is best. Despite this, there is little work in the literature evaluating their comparative performance. One exploration of this topic using microbenchmarks found that lazy outperforms eager and increases its advantage as contention rises. Furthermore, eager was prone to livelock when accesses were irregular, which resulted in starvation and low throughput. We revisit the comparative performance of eager and lazy under contention using a larger set of microbenchmarks, more complex benchmarks from STAMP, and against multiple state-of-the-art STMs: word-based RSTM, TinySTM and SwissTM. We validate earlier findings that eager suffers from livelock, especially when accesses are irregular. This inspired Purge-Rehab: a lightweight mechanism for controlling transaction restarts in eager validation to reduce livelock and thus improve throughput and reduce starvation. Compared to lazy validation, Purge-Rehab achieves higher performance in five benchmarks, similar in four, and is lower in only one, showing that eager validation can achieve high performance under contention. Purge-Rehab is implemented in word-based RSTM, but is applicable to any eager STM.

[1]  Maurice Herlihy,et al.  Robust Contention Management in Software Transactional Memory , 2005, OOPSLA 2005.

[2]  William N. Scherer,et al.  Contention Management in Dynamic Software Transactional Memory ∗ , 2004 .

[3]  Sandhya Dwarkadas,et al.  Refereeing conflicts in hardware transactional memory , 2009, ICS.

[4]  Ehsan Atoofian Improving performance of software transactional memory through contention locality , 2012, The Journal of Supercomputing.

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

[6]  Hsien-Hsin S. Lee,et al.  Adaptive transaction scheduling for transactional memory systems , 2008, SPAA '08.

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

[8]  Per Stenström,et al.  Eager Beats Lazy: Improving Store Management in Eager Hardware Transactional Memory , 2013, IEEE Transactions on Parallel and Distributed Systems.

[9]  Danny Hendler,et al.  Scheduling support for transactional memory contention management , 2010, PPoPP '10.

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

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

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

[13]  Kunle Olukotun,et al.  Eigenbench: A simple exploration tool for orthogonal TM characteristics , 2010, IEEE International Symposium on Workload Characterization (IISWC'10).

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

[15]  Michael F. Spear,et al.  A comprehensive strategy for contention management in software transactional memory , 2009, PPoPP '09.

[16]  Michael F. Spear,et al.  An integrated hardware-software approach to flexible transactional memory , 2007, ISCA '07.

[17]  D. B. Lomet Process structuring, synchronization, and recovery using atomic actions , 1977 .

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

[19]  Mikel Luján,et al.  Steal-on-Abort: Improving Transactional Memory Performance through Dynamic Transaction Reordering , 2008, HiPEAC.

[20]  Chen Ding,et al.  A Key-based Adaptive Transactional Memory Executor , 2007, 2007 IEEE International Parallel and Distributed Processing Symposium.

[21]  Sameer Kulkarni,et al.  A transactional memory with automatic performance tuning , 2012, TACO.

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

[23]  Rachid Guerraoui,et al.  Stretching transactional memory , 2009, PLDI '09.

[24]  Danny Hendler,et al.  CAR-STM: scheduling-based collision avoidance and resolution for software transactional memory , 2008, PODC '08.