Abstract
Software Transactional Memory (STM) was initially proposed as a lock-free mechanism for concurrency control. Early implementations had efficiency limitations, and soon obstruction-free proposals appeared, to tackle this problem, often simplifying STM implementation. Today, most of the modern and top-performing STMs use blocking designs, relying on locks to ensure an atomic commit operation. This approach has revealed better in practice, in part due to its simplicity. Yet, it may have scalability problems when we move into many-core computers, requiring fine-tuning and careful programming to avoid contention. In this paper we present and discuss the modifications we made to a lock-based multi-version STM in Java, to turn it into a lock-free implementation that we have tested to scale at least up to 192 cores, and which provides results that compete with, and sometimes exceed, some of today's top-performing lock-based implementations. The new lock-free commit algorithm allows write transactions to proceed in parallel, by allowing them to run their validation phase independently of each other, and by resorting to helping from threads that would otherwise be waiting to commit, during the write-back phase. We also present a new garbage collection algorithm to dispose of old unused object versions that allows for asynchronous identification of unnecessary versions, which minimizes its interference with the rest of the transactional system.
- LSA-STM project home page. http://tmware.org/lsastm.Google Scholar
- J. Cachopo. Development of Rich Domain Models with Atomic Actions. PhD thesis, Instituto Superior Técnico, Universidade Técnica de Lisboa, 2007.Google Scholar
- J. Cachopo and A. Rito-Silva. Versioned boxes as the basis for memory transactions. Sci. Comput. Program., 63 (2): 172--185, 2006. Google Scholar
Digital Library
- N. Carvalho, J. Cachopo, L. Rodrigues, and A. Rito-Silva. Versioned transactional shared memory for the FénixEDU web application. In WDDDM '08: Proceedings of the 2nd workshop on Dependable distributed data management, pages 15--18, New York, NY, USA, 2008. ACM. Google Scholar
Digital Library
- L. Dalessandro, M. F. Spear, and M. L. Scott. NOrec: Streamlining STM by abolishing ownership records. In PPoPP'10: Proc. 15th ACM Symp. on Principles and Practice of Parallel Programming, jan 2010. Google Scholar
Digital Library
- D. Dice, O. Shalev, and N. Shavit. Transactional locking II. In DISC'06: Proc. 20th International Symposium on Distributed Computing, pages 194--208, sep 2006. Springer-Verlag Lecture Notes in Computer Science volume 4167. Google Scholar
Digital Library
- R. Ennals. Efficient software transactional memory. Technical Report IRC-TR-05-051, Intel Research Cambridge Tech Report, Jan 2005.Google Scholar
- P. Felber, C. Fetzer, and T. Riegel. Dynamic performance tuning of word-based software transactional memory. In PPoPP'08: Proc. 13th ACM SIGPLAN Symposium on Principles and practice of parallel programming, pages 237--246, feb 2008. Google Scholar
Digital Library
- K. Fraser and T. Harris. Concurrent programming without locks. ACM Trans. Comput. Syst., 25 (2): 5, 2007. Google Scholar
Digital Library
- R. Guerraoui, M. Kapalka, and J. Vitek. Stmbench7: A benchmark for software transactional memory. In EuroSys'07: Proceedings of the 2nd ACM SIGOPS/EuroSys European Conference on Computer Systems 2007, pages 315--324, New York, NY, USA, 2007. ACM. Google Scholar
Digital Library
- M. Herlihy. Wait-free synchronization. ACM Trans. Program. Lang. Syst., 13 (1): 124--149, 1991. Google Scholar
Digital Library
- M. Herlihy and J. E. B. Moss. Transactional memory: architectural support for lock-free data structures. In ISCA'93: Proceedings of the 20th annual international symposium on Computer architecture, pages 289--300, New York, NY, USA, 1993. ACM. Google Scholar
Digital Library
- G. Korland, N. Shavit, and P. Felber. Noninvasive concurrency with Java STM. In MultiProg 2010: Third Workshop on Programmability Issues for Multi-Core Computers, 2010.Google Scholar
- J. Manson, W. Pugh, and S. V. Adve. The Java memory model. In POPL'05: Proceedings of the 32nd ACM SIGPLAN-SIGACT symposium on Principles of programming languages, pages 378--391, New York, NY, USA, 2005. ACM. Google Scholar
Digital Library
- V. J. Marathe and M. Moir. Toward high performance nonblocking software transactional memory. In phPPoPP'08: Proceedings of the 13th ACM SIGPLAN Symposium on Principles and practice of parallel programming, pages 227--236, New York, NY, USA, 2008. ACM. Google Scholar
Digital Library
- D. Perelman, R. Fan, and I. Keidar. On maintaining multiple versions in STM. In PODC'10: Proceedings of the 29th ACM symposium on Principles of Distributed Computing, July 2010. Google Scholar
Digital Library
- T. Riegel, P. Felber, and C. Fetzer. A lazy snapshot algorithm with eager validation. In Proceedings of the 20th International Symposium on Distributed Computing, DISC 2006, volume 4167 of Lecture Notes in Computer Science, pages 284--298. Springer, Sep 2006. ISBN 3--540--44624--9. Google Scholar
Digital Library
- B. Saha, A.-R. Adl-Tabatabai, R. L. Hudson, C. C. Minh, and B. Hertzberg. McRT-STM: A high performance software transactional memory system for a multi-core runtime. In Proceedings of the 11th Symposium on Principles and Practice of Parallel Programming, pages 187--197. ACM Press, 2006. Google Scholar
Digital Library
- N. Shavit and D. Touitou. Software transactional memory. In Proceedings of the 14th Annual ACM Symposium on Principles of Distributed Computing, pages 204--213. ACM Press, 1995. Google Scholar
Digital Library
- spear:ringstm:spaa:2008M. F. Spear, M. M. Michael, and C. von Praun. RingSTM: scalable transactions with a single atomic instruction. In SPAA'08: Proc. twentieth annual symposium on Parallelism in algorithms and architectures, pages 275--284, jun 2008. Google Scholar
Digital Library
Index Terms
Lock-free and scalable multi-version software transactional memory
Recommendations
Fast Serializable Multi-Version Concurrency Control for Main-Memory Database Systems
SIGMOD '15: Proceedings of the 2015 ACM SIGMOD International Conference on Management of DataMulti-Version Concurrency Control (MVCC) is a widely employed concurrency control mechanism, as it allows for execution modes where readers never block writers. However, most systems implement only snapshot isolation (SI) instead of full ...
Lock-free and scalable multi-version software transactional memory
PPoPP '11: Proceedings of the 16th ACM symposium on Principles and practice of parallel programmingSoftware Transactional Memory (STM) was initially proposed as a lock-free mechanism for concurrency control. Early implementations had efficiency limitations, and soon obstruction-free proposals appeared, to tackle this problem, often simplifying STM ...
Lock-Free Transactional Transformation for Linked Data Structures
Special Issue on SPAA 2016Nonblocking data structures allow scalable and thread-safe access to shared data. They provide individual operations that appear to execute atomically. However, it is often desirable to execute multiple operations atomically in a transactional manner. ...







Comments