# Adaptive Versioning in Transactional Memory Systems +
## 7 Concluding Remarks  
Transactional memory has been receiving much attention from both academia and industry. One of the most challenging issues is how to ensure consistency of the shared data through speculative execution. Eager and lazy versioning have been used individually to support speculative execution in existing TM systems. However, whether to use eager or lazy versioning is better is not clear and previous studies contradict on the recommendations. In this article, we have presented an adaptive framework that dynamically switches between eager and lazy versioning at runtime through appropriate transaction abort/commit data collected at runtime, obviating the need of a priori knowledge on the workload and contention scenario to pick the appropriate versioning method for better performance. Our framework is quite simple and applicable in both persistent and non-persistent TM systems. The framework achieves significantly better performance in terms of execution time and number of aborts for both persistent and non-persistent memories compared to eager and lazy versioning running individually in 5 micro-benchmarks and 8 applications from STAMP and STAMPEDE suites. In persistent TM systems, the adaptive framework achieved performance improvements as much as 1.5\(\times\) for execution time and as much as 240\(\times\) for number of aborts, whereas in non-persistent TM systems, it achieved performance improvements as much as 6.3\(\times\) for execution time and as much as 170\(\times\) for number of aborts. We believe that our results and techniques will be helpful in choosing proper versioning for TM systems.  
For the future work, it will be interesting to see whether there is a better technique on making decision on when to switch between eager and lazy versioning and how to minimize the time gap of switching from one versioning method to another. It will also be interesting to run experiments on the real persistent memory such as Optane DC persistent memory [47] and provide the comparison against more state-of-the-art STM, Durable STM, and HTM implementations.  
Figure 29: Aborts in STAMP benchmarks for \(Adaptive\_ETL\) for four different contention management techniques in non-persistent TM.  
**Author Contributions:** Conceptualization, G.S.; methodology, P.P. and G.S.; software, P.P.; validation, G.S.; formal analysis, P.P. and G.S.; investigation, P.P. and G.S.; resources, G.S.; writing--original draft preparation, P.P.; writing--review and editing, G.S.; visualization, P.P.; supervision, G.S.; project administration, G.S.; funding acquisition, G.S. All authors have read and agreed to the published version of the manuscript.  
**Funding:** This research was funded by the National Science Foundation grant number CCF-1936450.  
**Data Availability Statement:** Not applicable.  
**Acknowledgments:** The authors thank the anonymous reviewers for their valuable comments.  
**Conflicts of Interest:** The authors declare no conflict of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript, or in the decision to publish the results.