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.
- ISO/IEC. Technical Specification for C++ Extensions for Transactional Memory, 19841:2015. 2015.Google Scholar
- ISO/IEC. Programming Languages --- C++, 14882:2017. 2017.Google Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- S. V. Adve and M. D. Hill. Weak ordering - A new definition. In International Symposium on Computer Architecture (ISCA), pages 2--14, 1990. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- L. Dalessandro and M. L. Scott. Strong isolation is a weak idea. In Workshop on Transactional Computing (TRANSACT), 2009.Google Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- D. Dice, O. Shalev, and N. Shavit. Transactional locking II. In International Symposium on Distributed Computing (DISC), pages 194--208, 2006. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Cross Ref
- 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 Scholar
Digital Library
- I. Filipovic, P. O'Hearn, N. Rinetzky, and H. Yang. Abstraction for concurrent objects. Theoretical Computer Science, 411(51--52):4379 -- 4398, 2010. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- R. Guerraoui and M. Kapalka. Principles of Transactional Memory. Synthesis Lectures on Distributed Computing Theory. Morgan & Claypool Publishers, 2010. Google Scholar
Digital Library
- T. Harris, J. Larus, and R. Rajwar. Transactional Memory. Morgan and Claypool Publishers, 2nd edition, 2010. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- Intel Corporation. Intel architecture instruction set extensions programming reference. Chapter 8: Intel transactional synchronization extensions, 2012.Google Scholar
- 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 Scholar
Digital Library
- A. Khyzha, H. Attiya, A. Gotsman, and N. Rinetzky. Safe privatization in transactional memory (extended version). arXiv CoRR, 1801.04249, 2018.Google Scholar
- 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 Scholar
Digital Library
- L. Lamport. How to make a multiprocessor computer that correctly executes multiprocess programs. IEEE Trans. Computers, 28(9):690--691, 1979. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- M. Lesani, V. Luchangco, and M. Moir. Specifying transactional memories with nontransactional operations. In Workshop on the Theory of Transactional Memory (WTTM), 2013.Google Scholar
- 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 Scholar
Digital Library
- 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 Scholar
- 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 Scholar
Digital Library
- 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 Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 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 Symposium on Principles and Practice of Parallel Programming (PPOPP), pages 187--197, 2006. Google Scholar
Digital Library
- N. Shavit and D. Touitou. Software transactional memory. Distributed Computing, 10(2):99--116, 1997.Google Scholar
Cross Ref
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Cross Ref
Index Terms
Safe privatization in transactional memory
Recommendations
Safe privatization in transactional memory
PPoPP '18: Proceedings of the 23rd ACM SIGPLAN Symposium on Principles and Practice of Parallel ProgrammingTransactional 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, ...
Low-overhead software transactional memory with progress guarantees and strong semantics
PPoPP 2015: Proceedings of the 20th ACM SIGPLAN Symposium on Principles and Practice of Parallel ProgrammingSoftware transactional memory offers an appealing alternative to locks by improving programmability, reliability, and scalability. However, existing STMs are impractical because they add high instrumentation costs and often provide weak progress ...
An efficient software transactional memory using commit-time invalidation
CGO '10: Proceedings of the 8th annual IEEE/ACM international symposium on Code generation and optimizationTo improve the performance of transactional memory (TM), researchers have found many eager and lazy optimizations for conflict detection, the process of determining if transactions can commit. Despite these optimizations, nearly all TMs perform one ...







Comments