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.
- 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 ScholarDigital Library
- P. A. Bernstein and N. Goodman. Multiversion concurrency control-theory and algorithms. ACM Transactions on Database Systems, 8(4):465--483, 1983. Google ScholarDigital Library
- C. Blundell, E. Lewis, and M. M. K. Martin. Subtleties of transactional memory atomicity semantics. IEEE Computer Architecture Letters, 5(2), 2006. Google ScholarDigital Library
- Y. Breitbart, D. Georgakopoulos, M. Rusinkiewicz, and A. Silberschatz. On rigorous transaction scheduling. IEEE Transactions on Software Engineering, 17(9):954--960, 1991. Google ScholarDigital Library
- 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 Scholar
- D. Dice, O. Shalev, and N. Shavit. Transactional locking II. In Proceedings of the 20th International Symposium on Distributed Computing (DISC'06), 2006. Google ScholarDigital Library
- R. Ennals. Software transactional memory should not be obstruction-free. Technical Report IRC-TR-06-052, Intel Research Cambridge Tech Report, Jan 2006.Google Scholar
- J. Gray and A. Reuter. Transaction Processing: Concepts and Techniques. Morgan Kaufmann, 1993. Google ScholarDigital Library
- 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 ScholarDigital Library
- 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 Scholar
- V. Hadzilacos. A theory of reliability in database systems. Journal of the ACM, 35(1):121--145, 1988. Google ScholarDigital Library
- 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 ScholarDigital Library
- M. Herlihy. SXM software transactional memory package for C#. http://www.cs.brown.edu/~mph.Google Scholar
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- L. Lamport. On interprocess communication--part I: Basic formalism, part II: Algorithms. Distributed Computing, 1(2):77--101, 1986.Google ScholarCross Ref
- 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 ScholarDigital 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 Proceedings of the 1st ACM SIGPLAN Workshop on Languages, Compilers, and Hardware Support for Transactional Computing (TRANSACT'06), 2006.Google Scholar
- 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 Scholar
- J. E. B. Moss. Nested Transactions: An Approach to Reliable Distributed Computing. MIT Press, 1985. Google ScholarDigital Library
- J. E. B. Moss. Open nested transactions: Semantics and support. In Poster presented at Workshop on Memory Performance Issues (WMPI'06), Feb. 2006.Google Scholar
- 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 ScholarDigital Library
- C. H. Papadimitriou. The serializability of concurrent database updates. Journal of the ACM, 26(4):631--653, 1979. Google ScholarDigital Library
- 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 ScholarDigital Library
- 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 Scholar
- 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 Scholar
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- A. Y. Zomaya, editor. Parallel and Distributed Computing Handbook. McGraw-Hill, 1996. Google ScholarDigital Library
Index Terms
- On the correctness of transactional memory
Recommendations
The semantics of progress in lock-based transactional memory
POPL '09Transactional memory (TM) is a promising paradigm for concurrent programming. Whereas the number of TM implementations is growing, however, little research has been conducted to precisely define TM semantics, especially their progress guarantees. This ...
Inherent limitations on disjoint-access parallel implementations of transactional memory
SPAA '09: Proceedings of the twenty-first annual symposium on Parallelism in algorithms and architecturesTransactional memory (TM) is a promising approach for designing concurrent data structures, and it is essential to develop better understanding of the formal properties that can be achieved by TM implementations. Two fundamental properties of TM ...
Unbounded page-based transactional memory
Proceedings of the 2006 ASPLOS ConferenceExploiting thread level parallelism is paramount in the multicore era. Transactions enable programmers to expose such parallelism by greatly simplifying the multi-threaded programming model. Virtualized transactions (unbounded in space and time) are ...
Comments