Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
research-article

Characterizing Transactional Memory Consistency Conditions Using Observational Refinement

Published: 18 December 2017 Publication History

Abstract

Transactional memory (TM) facilitates the development of concurrent applications by letting a programmer designate certain code blocks as atomic. The common approach to stating TM correctness is through a consistency condition that restricts the possible TM executions. Unfortunately, existing consistency conditions fall short of formalizing the intuitive semantics of atomic blocks through which programmers use a TM. To close this gap, we formalize programmer expectations as observational refinement between TM implementations. This states that properties of a program using a concrete TM implementation can be established by analyzing its behavior with an abstract TM, serving as a specification of the concrete one.
We show that a variant of Transactional Memory Specification (TMS), a TM consistency condition, is equivalent to observational refinement for a programming language where local variables are rolled back upon a transaction abort. We thereby establish that TMS is the weakest acceptable condition for this case. We then propose a new consistency condition, called Strong Transactional Memory Specification (STMS), and show that it is equivalent to observational refinement for a language where local variables are not rolled back upon aborts. Finally, we show that under certain natural assumptions on TM implementations, STMS is equivalent to a variant of a well-known condition of opacity.
Our results suggest a new approach to evaluating TM consistency conditions and enable TM implementors and language designers to make better-informed decisions.

References

[1]
Martín Abadi, Andrew Birrell, Tim Harris, and Michael Isard. 2008. Semantics of transactional memory and automatic mutual exclusion. In Proceedings of POPL. ACM, New York, NY, 63--74.
[2]
Hagit Attiya, Alexey Gotsman, Sandeep Hans, and Noam Rinetzky. 2013a. A programming language perspective on transactional memory consistency. In Proceedings of PODC. ACM, New York, NY, 309--318.
[3]
Hagit Attiya, Alexey Gotsman, Sandeep Hans, and Noam Rinetzky. 2014. Safety of live transactions in transactional memory: TMS is necessary and sufficient. In Proceedings of DISC. 376--390.
[4]
Hagit Attiya, Sandeep Hans, Petr Kuznetsov, and Srivatsan Ravi. 2013b. Safety of deferred update in transactional memory. In Proceedings of ICDCS. IEEE, Los Alamitos, CA, 601--610.
[5]
Annette Bieniusa and Peter Thiemann. 2011. Proving isolation properties for software transactional memory. In Proceedings of ESOP. 38--56.
[6]
Luke Dalessandro, Michael F. Spear, and Michael L. Scott. 2010. NOrec: Streamlining STM by abolishing ownership records. In Proceedings of PPOPP. ACM, New York, NY, 67--78.
[7]
David Dice, Ori Shalev, and Nir Shavit. 2006. Transactional locking II. In Proceedings of DISC. 194--208.
[8]
Simon Doherty, Lindsay Groves, Victor Luchangco, and Mark Moir. 2013. Towards formally specifying and verifying transactional memory. Formal Aspects of Computing 25, 5, 769--799.
[9]
Ivana Filipovic, Peter W. O’Hearn, Noam Rinetzky, and Hongseok Yang. 2009. Abstraction for concurrent objects. In Proceedings of ESOP. 252--266.
[10]
Alexey Gotsman and Hongseok Yang. 2011. Liveness-preserving atomicity abstraction. In Proceedings of ICALP. 453--465.
[11]
Rachid Guerraoui and Michal Kapalka. 2008. On the correctness of transactional memory. In Proceedings of PPOPP. ACM, New York, NY 175--184.
[12]
Rachid Guerraoui and Michal Kapalka. 2011. Principles of Transactional Memory. Morgan 8 Claypool, San Rafael, CA.
[13]
T. Harris, J. Larus, and R. Rajwar. 2010. Transactional Memory. Morgan 8 Claypool, San Rafael, CA.
[14]
Tim Harris, Simon Marlow, Simon L. Peyton Jones, and Maurice Herlihy. 2005. Composable memory transactions. In Proceedings of PPOPP. ACM, New York, NY, 48--60.
[15]
Tim Harris, Mark Plesko, Avraham Shinnar, and David Tarditi. 2006. Optimizing memory transactions. In Proceedings of PLDI. ACM, New York, NY, 14--25.
[16]
J. He, C. Hoare, and J. Sanders. 1986. Data refinement refined. In Proceedings of ESOP. 187--196.
[17]
J. He, C. Hoare, and J. Sanders. 1987. Prespecification in data refinement. Information Processing Letters 25, 2, 71--76.
[18]
Maurice Herlihy, Victor Luchangco, Mark Moir, and William N. Scherer III. 2003. Software transactional memory for dynamic-sized data structures. In Proceedings of PODC. ACM, New York, NY, 92--101.
[19]
Maurice Herlihy and J. Eliot B. Moss. 1993. Transactional memory: Architectural support for lock-free data structures. ACM SIGARCH Computer Architecture News 21, 2, 289--300.
[20]
Maurice Herlihy and Nir Shavit. 2008. The Art of Multiprocessor Programming. Morgan Kaufmann.
[21]
Maurice Herlihy and Jeannette M. Wing. 1990. Linearizability: A correctness condition for concurrent objects. ACM Transactions on Programming Languages and Systems 12, 3, 463--492.
[22]
Damien Imbs and Michel Raynal. 2012. Virtual world consistency: A condition for STM systems (with a versatile protocol with invisible read operations). Theoretical Computer Science 444, 113--127.
[23]
Leslie Lamport. 1979. How to make a multiprocessor computer that correctly executes multiprocess programs. IEEE Transactions on Computers 28, 9, 690--691.
[24]
Virendra J. Marathe, William N. Scherer III, and Michael L. Scott. 2005. Adaptive software transactional memory. In Proceedings of DISC. 354--368.
[25]
Katherine F. Moore and Dan Grossman. 2008. High-level small-step operational semantics for transactions. In Proceedings of POPL. ACM, New York, NY, 51--62.
[26]
J. Eliot B. Moss and Antony L. Hosking. 2006. Nested transactional memory: Model and architecture sketches. Science of Computer Programming 63, 2, 186--201.
[27]
Yang Ni, Vijay S. Menon, Ali-Reza Adl-Tabatabai, Antony L. Hosking, Richard L. Hudson, J. Eliot B. Moss, Bratin Saha, and Tatiana Shpeisman. 2007. Open nesting in software transactional memory. In Proceedings of PPOPP. 68--78.
[28]
Christos H. Papadimitriou. 1979. The serializability of concurrent database updates. Journal of the ACM 26, 4, 631--653.
[29]
Torvald Riegel, Pascal Felber, and Christof Fetzer. 2006. A lazy snapshot algorithm with eager validation. In Proceedings of DISC. 284--298.
[30]
Scala STM Expert Group. 2012. Scala STM Quick Start Guide. Retrieved October 29, 2017, from https://nbronson.github.io/scala-stm/quick_start.html.
[31]
Konrad Siek and Pawel T. Wojciechowski. 2015. Last-use opacity: A strong safety property for transactional memory with early release support. arXiv:1506.06275. http://arxiv.org/abs/1506.06275.
[32]
Michael F. Spear, Virendra J. Marathe, Luke Dalessandro, and Michael L. Scott. 2007. Privatization techniques for software transactional memory. In Proceedings of PODC. 338--339.
[33]
M. F. Spear, M. Silverman, L. Dalessandro, M. M. Michael, and M. L. Scott. 2008. Implementing and exploiting inevitability in software transactional memory. In Proceedings of ICPP. IEEE, Los Alamitos, CA, 59--66.
[34]
Adam Welc, Bratin Saha, and Ali-Reza Adl-Tabatabai. 2008. Irrevocable transactions and their applications. In Proceedings of SPAA. ACM, New York, NY, 285--296.

Cited By

View all
  • (2022)C4: verified transactional objectsProceedings of the ACM on Programming Languages10.1145/35273246:OOPSLA1(1-31)Online publication date: 29-Apr-2022

Recommendations

Comments

Information & Contributors

Information

Published In

cover image Journal of the ACM
Journal of the ACM  Volume 65, Issue 1
February 2018
209 pages
ISSN:0004-5411
EISSN:1557-735X
DOI:10.1145/3155102
Issue’s Table of Contents
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 18 December 2017
Accepted: 01 August 2017
Revised: 01 July 2017
Received: 01 June 2016
Published in JACM Volume 65, Issue 1

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. STMS
  2. Strong Transactional Memory Specification
  3. TMS
  4. Transactional Memory Specification
  5. Transactions
  6. atomicity
  7. correctness conditions
  8. opacity

Qualifiers

  • Research-article
  • Research
  • Refereed

Funding Sources

  • ADVENT
  • Broadcom Foundation and Tel Aviv University Authentication Initiative
  • EU FP7 projects TRANSFORM

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)13
  • Downloads (Last 6 weeks)1
Reflects downloads up to 16 Oct 2024

Other Metrics

Citations

Cited By

View all
  • (2022)C4: verified transactional objectsProceedings of the ACM on Programming Languages10.1145/35273246:OOPSLA1(1-31)Online publication date: 29-Apr-2022

View Options

Get Access

Login options

Full Access

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media