Abstract

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.

Highlights

  • The many-core revolution challenges programmers to exploit concurrency if they want higher performance

  • RSTM is used because it is the only modern word-based, high performance Software TM (STM) that implements both eager and lazy validation

  • Purge-Rehab reduces repeat conflicts in eager RSTM to remove livelock, and these results show that the gains in throughput presented earlier are matched by reductions in wasted work

Read more

Summary

Introduction

The many-core revolution challenges programmers to exploit concurrency if they want higher performance. Spear et al [23] performed a comparative analysis of eager and lazy validation in Software TM (STM) They found that a carefully designed lazy (i) outperforms eager under contention, (ii) has the propensity to avoid pathologies that decrease throughput, and (iii) can avoid starvation through priority scheduling of transactions. Purge-Rehab is implemented on top of eager RSTM to enable a direct comparison with the state-of-the-art lazy RSTM of Spear et al [23], as well as the other STMs. The results validate that eager does struggle when there is heavy contention, but that Purge-Rehab (i) outperforms lazy in five cases by 1.5x − 3x and is competitive in four cases, (ii) averts livelock in benchmarks with irregular access patterns (pathology benchmarks), (iii) decreases wasted work, and (iv) manages starvation better than lazy.

Parallelizing with Transactional Memory
Transactional Memory
TM Versus Locks
Eager and Lazy Validation
Purge-Rehab
Reducing Livelock
Reducing Starvation
Cache Locality
Example Execution
Evaluation
Configuration and Benchmarks
Empirical Study
Throughput
Aborts and Wasted Work
Starvation
Related Work
Conclusion
Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call