skip to main content
research-article

Lock-free and scalable multi-version software transactional memory

Published:12 February 2011Publication History
Skip Abstract Section

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.

References

  1. LSA-STM project home page. http://tmware.org/lsastm.Google ScholarGoogle Scholar
  2. J. Cachopo. Development of Rich Domain Models with Atomic Actions. PhD thesis, Instituto Superior Técnico, Universidade Técnica de Lisboa, 2007.Google ScholarGoogle Scholar
  3. J. Cachopo and A. Rito-Silva. Versioned boxes as the basis for memory transactions. Sci. Comput. Program., 63 (2): 172--185, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  5. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  6. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  7. R. Ennals. Efficient software transactional memory. Technical Report IRC-TR-05-051, Intel Research Cambridge Tech Report, Jan 2005.Google ScholarGoogle Scholar
  8. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  9. K. Fraser and T. Harris. Concurrent programming without locks. ACM Trans. Comput. Syst., 25 (2): 5, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  11. M. Herlihy. Wait-free synchronization. ACM Trans. Program. Lang. Syst., 13 (1): 124--149, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  13. 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 ScholarGoogle Scholar
  14. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  15. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  16. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  17. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  18. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  19. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  20. 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 ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Lock-free and scalable multi-version software transactional memory

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in

      Full Access

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader
      About Cookies On This Site

      We use cookies to ensure that we give you the best experience on our website.

      Learn more

      Got it!