Abstract
The integration of transactions into hardware relaxed memory architectures is a topic of current research both in industry and academia. In this paper, we provide a general architectural framework for the introduction of transactions into models of relaxed memory in hardware, including the SC, TSO, ARMv8 and PPC models. Our framework incorporates flexible and expressive forms of transaction aborts and execution that have hitherto been in the realm of software transactional memory. In contrast to software transactional memory, we account for the characteristics of relaxed memory as a restricted form of distributed system, without a notion of global time. We prove abstraction theorems to demonstrate that the programmer API matches the intuitions and expectations about transactions.
Supplemental Material
- M. Abadi, A. Birrell, T. Harris, and M. Isard. 2011. Semantics of Transactional Memory and Automatic Mutual Exclusion. ACM Trans. Program. Lang. Syst. 33, 1, Article 2 (Jan. 2011), 50 pages.Google Scholar
Digital Library
- M. Abadi, T. Harris, and M. Mehrara. 2009. Transactional memory with strong atomicity using off-the-shelf memory protection hardware. In PPoPP, D. A. Reed and V. Sarkar (Eds.). ACM, 185–196. Google Scholar
Digital Library
- S. V. Adve and H.-J. Boehm. 2010. Memory models: a case for rethinking parallel languages and hardware. Commun. ACM 53, 8 (2010), 90–101. Google Scholar
Digital Library
- S. V. Adve and K. Gharachorloo. 1996. Shared Memory Consistency Models: A Tutorial. Computer 29, 12 (1996), 66–76. Google Scholar
Digital Library
- Y. Afek, A. Matveev, and N. Shavit. 2012. Pessimistic Software Lock-Elision. In DISC (Lecture Notes in Computer Science), M. K. Aguilera (Ed.), Vol. 7611. Springer, 297–311. Google Scholar
Digital Library
- J. Alglave. 2010. A shared memory poetics. PhD thesis. Université Paris 7 and INRIA.Google Scholar
- J. Alglave, L. Maranget, and M. Tautschnig. 2014. Herding Cats: Modelling, Simulation, Testing, and Data Mining for Weak Memory. ACM Trans. Program. Lang. Syst. 36, 2 (2014), 7:1–7:74.Google Scholar
Digital Library
- A. Armstrong, B. Dongol, and S. Doherty. 2017. Proving Opacity via Linearizability: A Sound and Complete Method. In FORTE (Lecture Notes in Computer Science), Vol. 10321. Springer, 50–66. Google Scholar
Cross Ref
- H. Attiya, A. Gotsman, S. Hans, and N. Rinetzky. 2013. A Programming Language Perspective on Transactional Memory Consistency. In PODC. ACM, New York, NY, USA, 309–318. Google Scholar
Digital Library
- H. Attiya, A. Gotsman, S. Hans, and N. Rinetzky. 2014. Safety of Live Transactions in Transactional Memory: TMS is Necessary and Sufficient. In DISC (Lecture Notes in Computer Science), F. Kuhn (Ed.), Vol. 8784. Springer, 376–390. Google Scholar
Cross Ref
- M. Batty, S. Owens, S. Sarkar, P. Sewell, and T. Weber. 2011. Mathematizing C++ concurrency. In POPL. ACM, 55–66. Google Scholar
Digital Library
- C. Blundell, E. C. Lewis, and M. M. K. Martin. 2005. Deconstructing Transactions: The Subtleties of Atomicity. In Fourth Annual Workshop on Duplicating, Deconstructing, and Debunking.Google Scholar
- H.-J. Boehm and S. V. Adve. 2008. Foundations of the C++ concurrency memory model. In PLDI, R. Gupta and S. P. Amarasinghe (Eds.). ACM, 68–78. Google Scholar
Digital Library
- H. W. Cain, M. M. Michael, B. Frey, C. May, D. Williams, and H. Q. Le. 2013. Robust architectural support for transactional memory in the Power architecture. In ISCA, A. Mendelson (Ed.). ACM, 225–236. Google Scholar
Digital Library
- N. Chong, T. Sorensen, and J. Wickerson. 2017. The Semantics of Transactions and Weak Memory in x86, Power, ARMv8, and C++. ArXiv e-prints (Oct. 2017). arXiv: cs.PL/1710.04839Google Scholar
- L. Dalessandro and M. L. Scott. 2009. Strong Isolation is a Weak Idea. In TRANSACT ’09: 4th Workshop on Transactional Computing.Google Scholar
- L. Dalessandro, M. L. Scott, and M. F. Spear. 2010. Transactions As the Foundation of a Memory Consistency Model. In DISC (Lecture Notes in Computer Science). Springer-Verlag, Berlin, Heidelberg, 20–34. Google Scholar
Cross Ref
- P. Damron, A. Fedorova, Y. Lev, V. Luchangco, M. Moir, and D. Nussbaum. 2006. Hybrid Transactional Memory. SIGOPS Oper. Syst. Rev. 40, 5 (Oct. 2006), 336–346. Google Scholar
Digital Library
- W. Deacon. 2017. ARM64 cat file. https://github.com/herd/herdtools7/commit/daa126680b6ecba97ba47b3e05bbaa51a89f27b7 .Google Scholar
- J. Derrick, G. Smith, and B. Dongol. 2014. Verifying Linearizability on TSO Architectures. In IFM (Lecture Notes in Computer Science), Vol. 8739. Springer, 341–356. Google Scholar
Cross Ref
- N. Diegues and J. Cachopo. 2013. Practical Parallel Nesting for Software Transactional Memory. In DISC (Lecture Notes in Computer Science). Springer-Verlag New York, Inc., New York, NY, USA, 149–163. Google Scholar
Digital Library
- N. Diegues and P. Romano. 2015. Time-Warp: Efficient Abort Reduction in Transactional Memory. ACM Trans. Parallel Comput. 2, 2, Article 12 (June 2015), 44 pages.Google Scholar
Digital Library
- S. Doherty, L. Groves, V. Luchangco, and M. Moir. 2013. Towards formally specifying and verifying transactional memory. Formal Asp. Comput. 25, 5 (2013), 769–799. Google Scholar
Cross Ref
- D. Dziuma, P. Fatourou, and E. Kanellou. 2015. Consistency for Transactional Memory Computing. Springer International Publishing, Cham, 3–31. Google Scholar
Cross Ref
- K. P. Eswaran, J. N. Gray, R. A. Lorie, and I. L. Traiger. 1976. The Notions of Consistency and Predicate Locks in a Database System. Commun. ACM 19, 11 (Nov. 1976), 624–633. Google Scholar
Digital Library
- S. Flur, K. E. Gray, C. Pulte, S. Sarkar, A. Sezgin, L. Maranget, W. Deacon, and P. Sewell. 2016. Modelling the ARMv8 architecture, operationally: concurrency and ISA. In POPL. ACM, 608–621. Google Scholar
Digital Library
- D. Grossman, J. Manson, and W. Pugh. 2006. What do high-level memory models mean for transactions?. In Memory System Performance and Correctness. ACM, New York, NY, USA, 62–69. Google Scholar
Digital Library
- D. Grossman, V. Menon, S. Srinivas, and C. Zilles. 2007. Transactional Memory in Managed Runtimes - Hardware/Software View. https://www.microarch.org/micro40Google Scholar
- R. Guerraoui, T. A. Henzinger, and V. Singh. 2008. Permissiveness in Transactional Memories. In DISC (Lecture Notes in Computer Science), G. Taubenfeld (Ed.), Vol. 5218. Springer, 305–319. Google Scholar
Digital Library
- R. Guerraoui and M. Kapalka. 2008. On the Correctness of Transactional Memory. In PPoPP. ACM, New York, NY, USA, 175–184. Google Scholar
Digital Library
- R. Guerraoui and M. Kapalka. 2010. Principles of Transactional Memory. Morgan & Claypool Publishers.Google Scholar
- N. Haines, D. Kindred, J. G. Morrisett, S. M. Nettles, and J. M. Wing. 1994. Composing First-class Transactions. ACM Trans. Program. Lang. Syst. 16, 6 (Nov. 1994), 1719–1736. Google Scholar
Digital Library
- S. Hans, A. Hassan, R. Palmieri, S. Peluso, and B. Ravindran. 2016. Opacity vs TMS2: Expectations and Reality. In DISC (Lecture Notes in Computer Science), C. Gavoille and D. Ilcinkas (Eds.), Vol. 9888. Springer, 269–283. Google Scholar
Cross Ref
- T. Harris, J. Larus, and R. Rajwar. 2010. Transactional Memory, 2nd edition. Morgan & Claypool Publishers.Google Scholar
- T. Harris, S. Marlow, S. Peyton-Jones, and M. Herlihy. 2005. Composable Memory Transactions. In PPoPP. ACM, New York, NY, USA, 48–60. Google Scholar
Digital Library
- M. Herlihy and J. E. B. Moss. 1993. Transactional Memory: Architectural Support for Lock-Free Data Structures. In ISCA, A. J. Smith (Ed.). ACM, 289–300. Google Scholar
Digital Library
- M. P. Herlihy and J. M. Wing. 1990. Linearizability: a correctness condition for concurrent objects. ACM Trans. Program. Lang. Syst. 12, 3 (1990), 463–492. Google Scholar
Digital Library
- D. Imbs and M. Raynal. 2012. Virtual world consistency: A condition for STM systems (with a versatile protocol with invisible read operations). Theor. Comput. Sci. 444 (2012), 113–127. Google Scholar
Digital Library
- S. Jagannathan, J. Vitek, A. Welc, and A. Hosking. 2005. A transactional object calculus. Science of Computer Programming 57, 2 (2005), 164 – 186. Google Scholar
Digital Library
- I. Keidar and D. Perelman. 2009. On avoiding spare aborts in transactional memory. In SPAA, F. M. auf der Heide and M. A. Bender (Eds.). ACM, New York, NY, USA, 59–68. Google Scholar
Digital Library
- L. Lamport. 1979. How to Make a Correct Multiprocess Program Execute Correctly on a Multiprocessor. IEEE Trans. Computers 46, 7 (1979), 779–782. Google Scholar
Digital Library
- J. Larus and C. Kozyrakis. 2008. Transactional Memory. Commun. ACM 51, 7 (July 2008), 80–88. Google Scholar
Digital Library
- V. Luchangco, J. Maurer, M. Moir, H. Boehm, J. Gottschlich, M. Michael, T. Riegel, M. Scott, T. Shpeisman, M. Spear, and M. Wong. 2013. Transactional Memory Support for C++. http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3718. pdfGoogle Scholar
- J.-W. Maessen and A. 2007. Store Atomicity for Transactional Memory. Electronic Notes in Theoretical Computer Science 174, 9 (2007), 117 – 137. Proceedings of the Thread Verification Workshop (TV 2006).Google Scholar
Digital Library
- J. Manson, W. Pugh, and S. V. Adve. 2005. The Java memory model. In POPL, J. Palsberg and M. Abadi (Eds.). ACM, 378–391. Google Scholar
Digital Library
- L. Maranget, S. Sarkar, and P. Sewell. 2012. A Tutorial Introduction to the ARM and POWER Relaxed Memory Models. http://www.cl.cam.ac.uk/~pes20/ppc-supplemental/test7.pdf .Google Scholar
- K. F. Moore and D. Grossman. 2008. High-level small-step operational semantics for transactions. In POPL, G. C. Necula and P. Wadler (Eds.). ACM, 51–62. Google Scholar
Digital Library
- A. T. Nguyen. 2015. Investigation of Hardware Transactional Memory. Master’s thesis. MIT.Google Scholar
- Y. Ni, A. Welc, A.-R. Adl-Tabatabai, M. Bach, S. Berkowits, J. Cownie, R. Geva, S. Kozhukow, R. Narayanaswamy, J. Olivier, S. Preis, B. Saha, A. Tal, and X. Tian. 2008. Design and Implementation of Transactional Constructs for C/C++. In OOPSLA. ACM, New York, NY, USA, 195–212. Google Scholar
Digital Library
- C. Pulte, S. Flur, W. Deacon, J. French, S. Sarkar, and P. Sewell. 2018. Simplifying ARM Concurrency: Multicopy-atomic Axiomatic and Operational Models for ARMv8. In POPL. To appear.Google Scholar
- S. Sarkar, P. Sewell, J. Alglave, L. Maranget, and D. Williams. 2011. Understanding POWER multiprocessors. In PLDI. ACM, 175–186. Google Scholar
Digital Library
- M. Scott. 2015. Transactional Memory Today. SIGACT News 46, 2 (June 2015), 96–104. Google Scholar
Digital Library
- J. Sevcík. 2008. Program Transformations in Weak Memory Models. PhD thesis. Laboratory for Foundations of Computer Science, University of Edinburgh.Google Scholar
- P. Sewell, S. Sarkar, S. Owens, F. Z. Nardelli, and M. O. Myreen. 2010. x86-TSO: a rigorous and usable programmer’s model for x86 multiprocessors. Commun. ACM 53, 7 (2010), 89–97. Google Scholar
Digital Library
- N. Shavit and D. Touitou. 1995. Software Transactional Memory. In Proceedings of the Fourteenth Annual ACM Symposium on Principles of Distributed Computing (PODC ’95). ACM, New York, NY, USA, 204–213. Google Scholar
Digital Library
- J. Wickerson, M. Batty, T. Sorensen, and G. A. Constantinides. 2017. Automatically comparing memory consistency models. In POPL, G. Castagna and A. D. Gordon (Eds.). ACM, 190–204. Google Scholar
Digital Library
- R. M. Yoo, C. J. Hughes, K. Lai, and R. Rajwar. 2013. Performance evaluation of Intel® transactional synchronization extensions for high-performance computing. In SC, W. Gropp and S. Matsuoka (Eds.). ACM, 19:1–19:11.Google Scholar
Index Terms
Transactions in relaxed memory architectures
Recommendations
Verification of STM on relaxed memory models
Software transactional memories (STM) are described in the literature with assumptions of sequentially consistent program execution and atomicity of high level operations like read, write, and abort. However, in a realistic setting, processors use ...
Hardware Support for Relaxed Concurrency Control in Transactional Memory
MICRO '43: Proceedings of the 2010 43rd Annual IEEE/ACM International Symposium on MicroarchitectureToday's transactional memory systems implement the two-phase-locking (2PL) algorithm which aborts transactions every time a conflict happens. 2PL is a simple algorithm that provides fast transactional operations. However, it limits concurrency in ...
Hybrid STM/HTM for nested transactions on OpenJDK
OOPSLA '16Transactional memory (TM) has long been advocated as a promising pathway to more automated concurrency control for scaling concurrent programs running on parallel hardware. Software TM (STM) has the benefit of being able to run general transactional ...






Comments