skip to main content
10.1145/1345206.1345233acmconferencesArticle/Chapter ViewAbstractPublication PagesppoppConference Proceedingsconference-collections
research-article

On the correctness of transactional memory

Published:20 February 2008Publication History

ABSTRACT

Transactional memory (TM) is perceived as an appealing alternative to critical sections for general purpose concurrent programming. Despite the large amount of recent work on TM implementations, however, very little effort has been devoted to precisely defining what guarantees these implementations should provide. A formal description of such guarantees is necessary in order to check the correctness of TM systems, as well as to establish TM optimality results and inherent trade-offs.

This paper presents opacity, a candidate correctness criterion for TM implementations. We define opacity as a property of concurrent transaction histories and give its graph theoretical interpretation. Opacity captures precisely the correctness requirements that have been intuitively described by many TM designers. Most TM systems we know of do ensure opacity.

At a very first approximation, opacity can be viewed as an extension of the classical database serializability property with the additional requirement that even non-committed transactions are prevented from accessing inconsistent states. Capturing this requirement precisely, in the context of general objects, and without precluding pragmatic strategies that are often used by modern TM implementations, such as versioning, invisible reads, lazy updates, and open nesting, is not trivial.

As a use case of opacity, we prove the first lower bound on the complexity of TM implementations. Basically, we show that every single-version TM system that uses invisible reads and does not abort non-conflicting transactions requires, in the worst case, ?(k) steps for an operation to terminate, where k is the total number of objects shared by transactions. This (tight) bound precisely captures an inherent trade-off in the design of TM systems. The bound also highlights a fundamental gap between systems in which transactions can be fully isolated from the outside environment, e.g., databases or certain specialized transactional languages, and systems that lack such isolation capabilities, e.g., general TM frameworks.

References

  1. H. Berenson, P. Bernstein, J. Gray, J. Melton, E. O'Neil, and P. O'Neil. A critique of ANSI SQL isolation levels. In Proceedings of the 1995 ACM SIGMOD International Conference on Management of Data (SIGMOD'95), pages 1--10, New York, NY, USA, 1995. ACM Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. P. A. Bernstein and N. Goodman. Multiversion concurrency control-theory and algorithms. ACM Transactions on Database Systems, 8(4):465--483, 1983. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. C. Blundell, E. Lewis, and M. M. K. Martin. Subtleties of transactional memory atomicity semantics. IEEE Computer Architecture Letters, 5(2), 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Y. Breitbart, D. Georgakopoulos, M. Rusinkiewicz, and A. Silberschatz. On rigorous transaction scheduling. IEEE Transactions on Software Engineering, 17(9):954--960, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. J. Cachopo and A. Rito-Silva. Versioned boxes as the basis for memory transactions. In Proceedings of the Workshop on Synchronization and Concurrency in Object-Oriented Languages (SCOOL); in conjunction with the ACM Conference on Object-Oriented Programming, Systems, Languages and Applications (OOPSLA'05), 2005.Google ScholarGoogle Scholar
  6. D. Dice, O. Shalev, and N. Shavit. Transactional locking II. In Proceedings of the 20th International Symposium on Distributed Computing (DISC'06), 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. R. Ennals. Software transactional memory should not be obstruction-free. Technical Report IRC-TR-06-052, Intel Research Cambridge Tech Report, Jan 2006.Google ScholarGoogle Scholar
  8. J. Gray and A. Reuter. Transaction Processing: Concepts and Techniques. Morgan Kaufmann, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. R. Guerraoui, M. Herlihy, and B. Pochon. Toward a theory of transactional contention managers. In Proceedings of the 24th Annual ACM Symposium on Principles of Distributed Computing (PODC'05), 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. R. Guerraoui and M. KapaBka. Opacity: A correctness condition for transactional memory. Technical Report LPD-REPORT-2007-004, EPFL, May 2007. http://lpd.epfl.ch/kapalka/files/opacity-techreport07.pdf.Google ScholarGoogle Scholar
  11. V. Hadzilacos. A theory of reliability in database systems. Journal of the ACM, 35(1):121--145, 1988. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. T. Harris, M. Plesko, A. Shinnar, and D. Tarditi. Optimizing memory transactions. In Proceedings of ACM SIGPLAN 2006 Conference on Programming Language Design and Implementation (PLDI'06), 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. M. Herlihy. SXM software transactional memory package for C#. http://www.cs.brown.edu/~mph.Google ScholarGoogle Scholar
  14. M. Herlihy, V. Luchangco, M. Moir, and W. N. Scherer III. Software transactional memory for dynamic-sized data structures. In Proceedings of the 22th Annual ACM Symposium on Principles of Distributed Computing (PODC'03), pages 92--101, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. M. Herlihy and J. E. B. Moss. Transactional memory: Architectural support for lock-free data structures. In Proceedings of the 20th Annual International Symposium on Computer Architecture, pages 289--300. May 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. M. Herlihy and J. M. Wing. Linearizability: a correctness condition for concurrent objects. ACM Transactions on Programming Languages and Systems, 12(3):463--492, June 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. L. Lamport. On interprocess communication--part I: Basic formalism, part II: Algorithms. Distributed Computing, 1(2):77--101, 1986.Google ScholarGoogle ScholarCross RefCross Ref
  18. V. J. Maranthe, W. N. Scherer III, and M. L. Scott. Adaptive software transactional memory. In Proceedings of the 19th International Symposium on Distributed Computing (DISC'05), pages 354--368, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. 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 Proceedings of the 1st ACM SIGPLAN Workshop on Languages, Compilers, and Hardware Support for Transactional Computing (TRANSACT'06), 2006.Google ScholarGoogle Scholar
  20. J. E. B. Moss. Nested transactions and reliable distributed computing. In Second IEEE Symposium on Reliability in Distributed Software and Database Systems, pages 33--39, 1982.Google ScholarGoogle Scholar
  21. J. E. B. Moss. Nested Transactions: An Approach to Reliable Distributed Computing. MIT Press, 1985. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. J. E. B. Moss. Open nested transactions: Semantics and support. In Poster presented at Workshop on Memory Performance Issues (WMPI'06), Feb. 2006.Google ScholarGoogle Scholar
  23. Y. Ni, V. 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 Proceedings of the ACM SIGPLAN 2007 Symposium on Principles and Practice of Parallel Programming (PPoPP'07), pages 68--78, Mar. 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. C. H. Papadimitriou. The serializability of concurrent database updates. Journal of the ACM, 26(4):631--653, 1979. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. 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'06), 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. T. Riegel, P. Felber, and C. Fetzer. Snapshot isolation for software transactional memory. In Proceedings of the First ACM SIGPLAN Workshop on Languages, Compilers, and Hardware Support for Transactional Computing (TRANSACT'06), 2006.Google ScholarGoogle Scholar
  27. M. L. Scott. Sequential specification of transactional memory semantics. In Proceedings of the First ACM SIGPLAN Workshop on Languages, Compilers, and Hardware Support for Transactional Computing (TRANSACT'06), 2006.Google ScholarGoogle Scholar
  28. N. Shavit and D. Touitou. Software transactional memory. In Proceedings of the 14th Annual ACM Symposium on Principles of Distributed Computing (PODC'95), pages 204--213. Aug 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. M. F. Spear, V. J. Marathe, W. N. Scherer III, and M. L. Scott. Conflict detection and validation strategies for software transactional memory. In Proceedings of the 20th International Symposium on Distributed Computing (DISC'06), 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. W. E. Weihl. Local atomicity properties: Modular concurrency control for abstract data types. ACM Transactions on Programming Languages and Systems, 11(2):249--282, April 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. A. Y. Zomaya, editor. Parallel and Distributed Computing Handbook. McGraw-Hill, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. On the correctness of 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
                  • Published in

                    cover image ACM Conferences
                    PPoPP '08: Proceedings of the 13th ACM SIGPLAN Symposium on Principles and practice of parallel programming
                    February 2008
                    308 pages
                    ISBN:9781595937957
                    DOI:10.1145/1345206

                    Copyright © 2008 ACM

                    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 ACM 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: 20 February 2008

                    Permissions

                    Request permissions about this article.

                    Request Permissions

                    Check for updates

                    Qualifiers

                    • research-article

                    Acceptance Rates

                    Overall Acceptance Rate230of1,014submissions,23%

                  PDF Format

                  View or Download as a PDF file.

                  PDF

                  eReader

                  View online with eReader.

                  eReader