Abstract
Software Transactional Memory (STM) is an attractive basis for the development of language features for concurrent programming. However, the semantics of these features can be delicate and problematic. In this article we explore the trade-offs semantic simplicity, the viability of efficient implementation strategies, and the flexibility of language constructs. Specifically, we develop semantics and type systems for the constructs of the Automatic Mutual Exclusion (AME) programming model; our results apply also to other constructs, such as atomic blocks. With this semantics as a point of reference, we study several implementation strategies. We model STM systems that use in-place update, optimistic concurrency, lazy conflict detection, and rollback. These strategies are correct only under nontrivial assumptions that we identify and analyze. One important source of errors is that some efficient implementations create dangerous “zombie” computations where a transaction keeps running after experiencing a conflict; the assumptions confine the effects of these computations.
- Abadi, M. 2008. Automatic mutual exclusion and atomicity checks. In Concurrency, Graphs and Models, Essays Dedicated to Ugo Montanari on the Occasion of His 65th Birthday, P. Degano, R. D. Nicola, and J. Meseguer, Eds. Lecture Notes in Computer Science, vol. 5065. Springer-Verlag, 510--526. Google Scholar
Digital Library
- Abadi, M., Birrell, A., Harris, T., Hsieh, J., and Isard, M. 2008. Dynamic separation for transactional memory. Tech. rep. MSR-TR-2008-43, Microsoft Research.Google Scholar
- Abadi, M., Birrell, A., Harris, T., Hsieh, J., and Isard, M. 2009. Implementation and use of transactional memory with dynamic separation. In Proceedings of the 18th International Conference on Compiler Construction (CC'09), O. de Moor and M. I. Schwartzbach, Eds. Lecture Notes in Computer Science, vol. 5501. Springer-Verlag, 63--77. Google Scholar
Digital Library
- Abadi, M., Flanagan, C., and Freund, S. N. 2006. Types for safe locking: Static race detection for Java. ACM Trans. Program. Lang. Syst. 28, 2, 207--255. Google Scholar
Digital Library
- Abadi, M., Harris, T., and Moore, K. F. 2008. A model of dynamic separation for transactional memory. In Proceedings of the 19th International Confernece on Concurrency Theory (CONCUR'08), F. van Breugel and M. Chechik, Eds. Lecture Notes in Computer Science, vol. 5201. Springer-Verlag, 6--20. Google Scholar
Digital Library
- Adl-Tabatabai, A.-R., Lewis, B. T., Menon, V., Murphy, B. R., Saha, B., and Shpeisman, T. 2006. Compiler and runtime support for efficient software transactional memory. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI'06). 26--37. Google Scholar
Digital Library
- Adve, S. V. and Hill, M. D. 1990. Weak ordering--a new definition. SIGARCH Comput. Archit. News 18, 3a, 2--14. Google Scholar
Digital Library
- Adya, A., Howell, J., Theimer, M., Bolosky, W. J., and Douceur, J. R. 2002. Cooperative task management without manual stack management. In Proceedings of the USENIX Annual Technical Conference (USENIX'02). 289--302. Google Scholar
Digital Library
- Allen, E., Chase, D., Hallett, J., Luchangco, V., Maessen, J.-W., Ryu, S., Steele Jr., G. L., and Tobin-Hochstadt, S. 2007. The Fortress language specification, v1.0β. Tech. rep., Sun Microsystems.Google Scholar
- Blundell, C., Lewis, E. C., and Martin, M. M. K. 2006. Subtleties of transactional memory atomicity semantics. Comput. Archit. Lett. 5, 2. Google Scholar
Digital Library
- Bronson, N. G., Kozyrakis, C., and Olukotun, K. 2009. Feedback-directed barrier optimization in a strongly isolated STM. In Proceedings of the 36th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL'09). 213--225. Google Scholar
Digital Library
- Carlstrom, B. D., McDonald, A., Chafi, H., Chung, J., Minh, C. C., Kozyrakis, C., and Olukotun, K. 2006. The Atomos transactional programming language. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI'06). 1--13. Google Scholar
Digital Library
- Cohen, A., O'Leary, J. W., Pnueli, A., Tuttle, M. R., and Zuck, L. D. 2007. Verifying correctness of transactional memories. In Proceedings of the 7th International Conference on Formal Methods in Computer-Aided Design (FMCAD'07). 37--44. Google Scholar
Digital Library
- Dalessandro, L. and Scott, M. L. 2009. Strong isolation is a weak idea. In Proceedings of the 4th Workshop on Transactional Computing (TRANSACT'09).Google Scholar
- Dice, D., Shalev, O., and Shavit, N. 2006. Transactional locking II. In Proceedings of the 20th International Symposium on Distributed Computing (DISC'06), S. Dolev, Ed., Lecture Notes in Computer Science, vol. 4167. Springer, 194--208. Google Scholar
Digital Library
- Dice, D. and Shavit, N. 2006. What really makes transactions faster? In Proceedings of the ACM SIGPLAN Workshop on Languages, Compilers, and Hardware Support for Transactional Computing (TRANSACT'06). http://hdl.handle.net/1802/4051.Google Scholar
- Grossman, D., Manson, J., and Pugh, W. 2006. What do high-level memory models mean for transactions? In Proceedings of the Workshop on Memory System Performance and Correctness (MSPC'06). 62--69. Google Scholar
Digital Library
- Guerraoui, R., Henzinger, T., and Singh, V. 2008a. Model checking transactional memories. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI'08). 372--382. Google Scholar
Digital Library
- Guerraoui, R., Henzinger, T. A., and Singh, V. 2008b. Completeness and nondeterminism in model checking transactional memories. In Proceedings of the 19th International Confernece on Concurrency Theory (CONCUR'08), F. van Breugel and M. Chechik, Eds. Lecture Notes in Computer Science, vol. 5201. Springer-Verlag, 21--35. Google Scholar
Digital Library
- Harris, T. and Fraser, K. 2003. Language support for lightweight transactions. In Proceedings of the 18th Annual ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA'03). 388--402. Google Scholar
Digital Library
- Harris, T., Marlow, S., Peyton Jones, S., and Herlihy, M. 2005. Composable memory transactions. In Proceedings of the 10th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming (PPoPP'05). 48--60. Google Scholar
Digital Library
- Harris, T., Plesko, M., Shinnar, A., and Tarditi, D. 2006. Optimizing memory transactions. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI'06). 14--25. Google Scholar
Digital Library
- Igarashi, A., Pierce, B. C., and Wadler, P. 2001. Featherweight Java: a minimal core calculus for Java and GJ. ACM Trans. Program. Lang. Syst. 23, 3, 396--450. Google Scholar
Digital Library
- Isard, M. and Birrell, A. 2007. Automatic mutual exclusion. In Proceedings of the 11th Workshop on Hot Topics in Operating Systems (HotOS'07). Google Scholar
Digital Library
- Jagannathan, S., Vitek, J., Welc, A., and Hosking, A. 2005. A transactional object calculus. Sci. Comput. Program. 57, 2, 164--186. Google Scholar
Digital Library
- Kuszmaul, B. C. and Leiserson, C. E. 2003. Transactions everywhere. Tech. rep., MIT. http://hdl.handle.net/1721.1/3692.Google Scholar
- Liblit, B. 2006. An operational semantics for LogTM. Tech. rep. 1571, University of Wisconsin--Madison. Version 1.0.Google Scholar
- Manson, J., Baker, J., Cunei, A., Jagannathan, S., Prochazka, M., Xin, B., and Vitek, J. 2005. Preemptible atomic regions for real-time Java. In Proceedings of the 26th IEEE Real-Time Systems Symposium (RTSS'05). 62--71. Google Scholar
Digital Library
- Manson, J., Pugh, W., and Adve, S. V. 2005. The Java memory model. In Proceedings of the 32nd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL'05). 378--391. Google Scholar
Digital Library
- Menon, V., Balensiefer, S., Shpeisman, T., Adl-Tabatabai, A.-R., Hudson, R., Saha, B., and Welc, A. 2008. Practical weak-atomicity semantics for Java STM. In Proceedings of the 20th Annual Symposium on Parallelism in Algorithms and Architectures (SPAA'08). 314--325. Google Scholar
Digital Library
- Moore, K. E., Bobba, J., Moravan, M. J., Hill, M. D., and Wood, D. A. 2006. LogTM: Log-based transactional memory. In Proceedings of the 12th International Symposium on High-Performance Computer Architecture (HPCA'06). 254--265.Google Scholar
- Moore, K. F. and Grossman, D. 2008. High-level small-step operational semantics for transactions. In Proceedings of the 35th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL'08). 51--62. Google Scholar
Digital Library
- Naik, M., Aiken, A., and Whaley, J. 2006. Effective static race detection for Java. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI'06). 308--319. Google Scholar
Digital Library
- Saha, B., Adl-Tabatabai, A.-R., Hudson, R. L., Minh, C. C., and Hertzberg, B. 2006. McRT-STM: a high performance software transactional memory system for a multi-core runtime. In Proceedings of the 11th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming (PPoPP'06). 187--197. Google Scholar
Digital Library
- Schneider, F. T., Menon, V., Shpeisman, T., and Adl-Tabatabai, A.-R. 2008. Dynamic optimization for efficient strong atomicity. In Proceedings of the 23rd ACM SIGPLAN Conference on Object-Oriented Programming Systems Languages and Applications (OOPSLA'08). 181--194. Google Scholar
Digital Library
- Scott, M. L. 2006. Sequential specification of transactional memory semantics. In Proceedings of the 1st ACM SIGPLAN Workshop on Languages, Compilers, and Hardware Support for Transactional Computing (TRANSACT'06). http://hdl.handle.net/1802/4050.Google Scholar
- Shavit, N. and Touitou, D. 1995. Software transactional memory. In Proceedings of the 14th ACM Symposium on Principles of Distributed Computing (PODC'95). 204--213. Google Scholar
Digital Library
- Shpeisman, T., Menon, V., Adl-Tabatabai, A.-R., Balensiefer, S., Grossman, D., Hudson, R. L., Moore, K. F., and Saha, B. 2007. Enforcing isolation and ordering in STM. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI'07). 78--88. Google Scholar
Digital Library
- Spear, M. F., Dalessandro, L., Marathe, V., and Scott, M. L. 2008. Ordering-based semantics for software transactional memory. In Proceedings of the 12th International Conference on Principles of Distributed Systems (OPODIS'08), T. P. Baker, A. Bui, and S. Tixeuil, Eds. Lecture Notes in Computer Science, vol. 972. Springer, 275--294. Google Scholar
Digital Library
- Spear, M. F., Marathe, V. J., Dalessandro, L., and Scott, M. L. 2007. Privatization techniques for software transactional memory. Tech. rep. 915, University of Rochester.Google Scholar
- Sterling, N. 1993. Warlock: A static data race analysis tool. In Proceedings of the USENIX Winter Technical Conference. 97--106.Google Scholar
- Tasiran, S. 2008. A compositional method for verifying software transactional memory implementations. Tech. rep. MSR-TR-2008-56, Microsoft Research.Google Scholar
- Wang, C., Chen, W.-Y., Wu, Y., Saha, B., and Adl-Tabatabai, A.-R. 2007. Code generation and optimization for transactional memory constructs in an unmanaged language. In Proceedings of the International Symposium on Code Generation and Optimization (CGO'07). 34--48. Google Scholar
Digital Library
- Welc, A., Jagannathan, S., and Hosking, A. 2005. Safe futures for Java. In Proceedings of the 20th Annual ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA'05). 439--453. Google Scholar
Digital Library
- Wright, A. K. and Felleisen, M. 1994. A syntactic approach to type soundness. Inform. Computat. 115, 1, 38--94. Google Scholar
Digital Library
Index Terms
Semantics of transactional memory and automatic mutual exclusion
Recommendations
Semantics of transactional memory and automatic mutual exclusion
POPL '08Software Transactional Memory (STM) is an attractive basis for the development of language features for concurrent programming. However, the semantics of these features can be delicate and problematic. In this paper we explore the tradeoffs between ...
Towards transactional memory semantics for C++
SPAA '09: Proceedings of the twenty-first annual symposium on Parallelism in algorithms and architecturesTransactional memory (TM) eliminates many problems associated with lock-based synchronization. Over recent years, much progress has been made in software and hardware implementation techniques for TM. However, before transactional memory can be ...
On the correctness of transactional memory
PPoPP '08: Proceedings of the 13th ACM SIGPLAN Symposium on Principles and practice of parallel programmingTransactional 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 ...






Comments