skip to main content
research-article

Safe privatization in transactional memory

Published:10 February 2018Publication History
Skip Abstract Section

Abstract

Transactional memory (TM) facilitates the development of concurrent applications by letting the programmer designate certain code blocks as atomic. Programmers using a TM often would like to access the same data both inside and outside transactions, e.g., to improve performance or to support legacy code. In this case, programmers would ideally like the TM to guarantee strong atomicity, where transactions can be viewed as executing atomically also with respect to non-transactional accesses. Since guaranteeing strong atomicity for arbitrary programs is prohibitively expensive, researchers have suggested guaranteeing it only for certain data-race free (DRF) programs, particularly those that follow the privatization idiom: from some point on, threads agree that a given object can be accessed non-transactionally. Supporting privatization safely in a TM is nontrivial, because this often requires correctly inserting transactional fences, which wait until all active transactions complete.

Unfortunately, there is currently no consensus on a single definition of transactional DRF, in particular, because no existing notion of DRF takes into account transactional fences. In this paper we propose such a notion and prove that, if a TM satisfies a certain condition generalizing opacity and a program using it is DRF assuming strong atomicity, then the program indeed has strongly atomic semantics. We show that our DRF notion allows the programmer to use privatization idioms. We also propose a method for proving our generalization of opacity and apply it to the TL2 TM.

References

  1. ISO/IEC. Technical Specification for C++ Extensions for Transactional Memory, 19841:2015. 2015.Google ScholarGoogle Scholar
  2. ISO/IEC. Programming Languages --- C++, 14882:2017. 2017.Google ScholarGoogle Scholar
  3. M. Abadi, A. Birrell, T. Harris, J. Hsieh, and M. Isard. Implementation and use of transactional memory with dynamic separation. In International Conference on Compiler Construction (CC), pages 63--77, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. M. Abadi, A. Birrell, T. Harris, and M. Isard. Semantics of transactional memory and automatic mutual exclusion. ACM Trans. Program. Lang. Syst., 33:2:1--2:50, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. M. Abadi, T. Harris, and K. F. Moore. A model of dynamic separation for transactional memory. In International Conference on Concurrency Theory (CONCUR), pages 6--20, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. S. V. Adve and M. D. Hill. Weak ordering - A new definition. In International Symposium on Computer Architecture (ISCA), pages 2--14, 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. H. Attiya, A. Gotsman, S. Hans, and N. Rinetzky. A programming language perspective on transactional memory consistency. In Symposium on Principles of Distributed Computing (PODC), pages 309--318, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. L. Dalessandro and M. L. Scott. Strong isolation is a weak idea. In Workshop on Transactional Computing (TRANSACT), 2009.Google ScholarGoogle Scholar
  9. L. Dalessandro, M. L. Scott, and M. F. Spear. Transactions as the foundation of a memory consistency model. In International Symposium on Distributed Computing (DISC), pages 20--34, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. L. Dalessandro, M. F. Spear, and M. L. Scott. Norec: streamlining STM by abolishing ownership records. In Symposium on Principles and Practice of Parallel Programming (PPOPP), pages 67--78, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. P. Damron, A. Fedorova, Y. Lev, V. Luchangco, M. Moir, and D. Nussbaum. Hybrid transactional memory. In International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS), pages 336--346, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. D. Dice, O. Shalev, and N. Shavit. Transactional locking II. In International Symposium on Distributed Computing (DISC), pages 194--208, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. D. Dice and N. Shavit. TLRW: return of the read-write lock. In Symposium on Parallelism in Algorithms and Architectures (SPAA), pages 284--293, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. S. Doherty, L. Groves, V. Luchangco, and M. Moir. Towards formally specifying and verifying Transactional Memory. Formal Aspects of Computing, 25(5):769--799, 2013. Google ScholarGoogle ScholarCross RefCross Ref
  15. P. Felber, C. Fetzer, P. Marlier, and T. Riegel. Time-based software transactional memory. IEEE Transactions on Parallel and Distributed Systems, 21(12):1793--1807, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. I. Filipovic, P. O'Hearn, N. Rinetzky, and H. Yang. Abstraction for concurrent objects. Theoretical Computer Science, 411(51--52):4379 -- 4398, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. A. Gotsman, N. Rinetzky, and H. Yang. Verifying concurrent memory reclamation algorithms with grace. In European Symposium on Programming (ESOP), pages 249--269, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. R. Guerraoui, T. A. Henzinger, M. Kapalka, and V. Singh. Transactions in the jungle. In Symposium on Parallelism in Algorithms and Architectures (SPAA), pages 263--272, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. R. Guerraoui and M. Kapalka. On the correctness of transactional memory. In Symposium on Principles and Practice of Parallel Programming (PPOPP), pages 175--184, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. R. Guerraoui and M. Kapalka. Principles of Transactional Memory. Synthesis Lectures on Distributed Computing Theory. Morgan & Claypool Publishers, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. T. Harris, J. Larus, and R. Rajwar. Transactional Memory. Morgan and Claypool Publishers, 2nd edition, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. M. Herlihy and J. E. B. Moss. Transactional memory: Architectural support for lock-free data structures. In International Symposium on Computer Architecture (ISCA), pages 289--300, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Intel Corporation. Intel architecture instruction set extensions programming reference. Chapter 8: Intel transactional synchronization extensions, 2012.Google ScholarGoogle Scholar
  24. G. Kestor, O. S. Unsal, A. Cristal, and S. Tasiran. T-rex: a dynamic race detection tool for C/C++ transactional memory applications. In European Systems Conference (Eurosys), pages 20:1--20:12, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. A. Khyzha, H. Attiya, A. Gotsman, and N. Rinetzky. Safe privatization in transactional memory (extended version). arXiv CoRR, 1801.04249, 2018.Google ScholarGoogle Scholar
  26. S. Kumar, M. Chu, C. J. Hughes, P. Kundu, and A. Nguyen. Hybrid transactional memory. In Symposium on Principles and Practice of Parallel Programming (PPOPP), pages 209--220, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. L. Lamport. How to make a multiprocessor computer that correctly executes multiprocess programs. IEEE Trans. Computers, 28(9):690--691, 1979. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. H. Q. Le, G. L. Guthrie, D. E. Williams, M. M. Michael, B. G. Frey, W. J. Starke, C. May, R. Odaira, and T. Nakaike. Transactional memory support in the ibm power8 processor. IBM Journal of Research and Development, 59(1):8:1--8:14, 2015.Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. M. Lesani, V. Luchangco, and M. Moir. Specifying transactional memories with nontransactional operations. In Workshop on the Theory of Transactional Memory (WTTM), 2013.Google ScholarGoogle Scholar
  30. J. Manson, W. Pugh, and S. V. Adve. The java memory model. In Symposium on Principles of Programming Languages (POPL), pages 378--391, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. V. J. Marathe, M. F. Spear, C. Heriot, A. Acharya, D. Eisenstat, W. N. Scherer III, and M. L. Scott. Lowering the overhead of software transactional memory. In Workshop on Transactional Computing (TRANSACT), 2006.Google ScholarGoogle Scholar
  32. P. E. McKenney. Exploiting Deferred Destruction: An Analysis of Read-Copy-Update Techniques in Operating System Kernels. PhD thesis, OGI School of Science and Engineering at Oregon Health and Sciences University, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. C. C. Minh, J. Chung, C. Kozyrakis, and K. Olukotun. STAMP: Stanford transactional applications for multi-processing. In International Symposium on Workload Characterization (IISWC), pages 35--46, 2008.Google ScholarGoogle Scholar
  34. K. F. Moore and D. Grossman. High-level small-step operational semantics for transactions. In Symposium on Principles of Programming Languages (POPL), pages 51--62, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. J. E. B. Moss and A. L. Hosking. Nested transactional memory: model and architecture sketches. Science of Computer Programming, 63(2):186--201, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. Y. Ni, V. S. Menon, A.-R. Adl-Tabatabai, A. L. Hosking, R. L. Hudson, J. E. B. Moss, B. Saha, and T. Shpeisman. Open nesting in software transactional memory. In Symposium on Principles and Practice of Parallel Programming (PPOPP), pages 68--78, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. M. Olszewski, J. Cutler, and J. G. Steffan. JudoSTM: A dynamic binary-rewriting approach to software transactional memory. In International Conference on Parallel Architecture and Compilation Techniques (PACT), pages 365--375, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. 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 Symposium on Principles and Practice of Parallel Programming (PPOPP), pages 187--197, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. N. Shavit and D. Touitou. Software transactional memory. Distributed Computing, 10(2):99--116, 1997.Google ScholarGoogle ScholarCross RefCross Ref
  40. T. Shpeisman, A.-R. Adl-Tabatabai, R. Geva, Y. Ni, and A. Welc. Towards transactional memory semantics for C++. In Symposium on Parallelism in Algorithms and Architectures (SPAA), pages 49--58, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. M. F. Spear, V. J. Marathe, L. Dalessandro, and M. L. Scott. Privatization techniques for software transactional memory. Technical Report 915, Computer Science Department, University of Rochester, 2007.Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. M. F. Spear, M. M. Michael, and C. von Praun. RingSTM: Scalable transactions with a single atomic instruction. In Symposium on Parallelism in Algorithms and Architectures (SPAA), pages 275--284, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  43. R. M. Yoo, Y. Ni, A. Welc, B. Saha, A. Adl-Tabatabai, and H. S. Lee. Kicking the tires of software transactional memory: why the going gets tough. In Symposium on Parallelism in Algorithms and Architectures (SPAA), pages 265--274, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  44. T. Zhou, P. Zardoshti, and M. F. Spear. Practical experience with transactional lock elision. In International Conference on Parallel Processing (ICPP), pages 81--90, 2017.Google ScholarGoogle ScholarCross RefCross Ref

Index Terms

  1. Safe privatization in 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

      • Published in

        cover image ACM SIGPLAN Notices
        ACM SIGPLAN Notices  Volume 53, Issue 1
        PPoPP '18
        January 2018
        426 pages
        ISSN:0362-1340
        EISSN:1558-1160
        DOI:10.1145/3200691
        Issue’s Table of Contents
        • cover image ACM Conferences
          PPoPP '18: Proceedings of the 23rd ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming
          February 2018
          442 pages
          ISBN:9781450349826
          DOI:10.1145/3178487

        Copyright © 2018 ACM

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 10 February 2018

        Check for updates

        Qualifiers

        • research-article

      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!