skip to main content
research-article
Free access

Composable memory transactions

Published: 01 August 2008 Publication History
First page of PDF

References

[1]
Abadi, M., Birrell, A., Harris, T., and Isard, M. Semantics of transactional memory and automatic mutual exclusion. POPL'08: Proceedings of the 35th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pp. 63--74. ACM, Jan. 2008.
[2]
Blelloch, G.E., Hardwick, J.C., Sipelstein, J., Zagha, M., and Chatterjee, S. Implementation of a portable nested data-parallel language. J. Parallel Distrib. Comput, 9. 21(1): 4--14, 1994.
[3]
Carlstrom, B.D., McDonald, A., Chafi, H., Chung, J., Minh, C.C., Kozyrakis, C, and Olukotun, K. The Atomos transactional programming language. PLDI'06: Proceedings of the 2006 ACMSIGPLAN Conference on Programming Language Design and Implementation, pp. 1--13, ACM, June 2006.
[4]
Chung, J., Minh, C.C., McDonald, A., Skare, T., Chafi, H., Carlstrom, B.D., Kozyrakis, C, and Olukotun, K. Tradeoffs in transactional memory virtualization. ASPLOS'06: Proceedings of the 12th International Conference on Architectural Support for Programming Languages and Operating Systems, pp. 371--381. ACM, Oct. 2006.
[5]
Damron, P., Fedorova, A., Lev, 12. Y., Luchangco, V., Moir, M., and Nussbaum, D. Hybrid transactional memory. ASPLOS'06: Proceedings of the 12th International Conference on Architectural Support for Programming Languages and Operating Systems, pp. 336--346, 13. ACM, Oct. 2006.
[6]
Daume III, H. Yet another Haskell tutorial, http://www.cs.utah.edu/~hal/docs/daurne02yaht.pdf, 2006.
[7]
Gray, J., and Reuter, A. Transaction Processing: Concepts and Techniques. Morgan Kaufmann Publishers, Inc. 1992.
[8]
Harris, T., and Fraser, K. Language support for lightweight transactions. OOPSLA'03: Proceedings of the 18th ACMSIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, pp. 388--402, ACM, Oct. 2003.
[9]
Harris, T., Marlow, S., Peyton Jones, S., and Herlihy, M. Composable memory transactions. PPoPP'05: Proceedings of the 10th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming. pp. 48--60, ACM, June 2005.
[10]
Harris, Ò., and Peyton Jones, S. Transactional memory with data invariants. TRANSACT'06: Proceedings of the 1st ACM SIGPLAN Workshop on Languages, Compilers, and Hardware Support for Transactional Computing, June 2006.
[11]
Herlihy, M., Luchangco, V, Moir, M., and Scherer, III, W.N. Software transactional memory for dynamic-sized data structures. PODC'03: Proceedings of the 22nd ACM Symposium on Principles of Distributed Computing, pp. 92--101, ACM, July 2003.
[12]
Herlihy, M. and Moss, J.E.B. Transactional memory: Architectural support for lock-free data structures. ISCA'93: Proceedings of the 20th International Symposium on Computer Architecture, pp. 289--300. ACM, May 1993.
[13]
Kumar, S., Chu, M., J. Hughes, C, Kundu, P., and Nguyen, A. Hybrid transactional memory. PPoPP'06: Proceedings of the 11th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming. pp. 209--220, ACM, Mar 2006.
[14]
Larus, J., and Rajwar, R. Transactional Memory (Synthesis Lectures on Computer Architecture). Morgan & Claypool Publishers, 2007.
[15]
Martin, M., Blundell, C, and Lewis, E. Subtleties of transactional memory atomicity semantics. IEEE Comput Archit Lett. 5(2):17, 2006.
[16]
Moore, K.F. and Grossman, D. High-level small-step operational semantics 22. for transactions. POPL'08: Proceedings of the 35th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pp. 51--62. ACM, Jan. 2008.
[17]
Moss, E.B. Nested transactions: An approach to reliable distributed computing. Tech. Rep. MIT/LCS/ TR-260, Massachusetts Institute of Technology, Apr. 1981.
[18]
Peyton Jones, S. Tackling the awkward squad: Monadic input/output, concurrency, exceptions, and foreign-language calls in Haskell. Engineering Theories of Software Construction, Marktoberdorf Summer School 2000.
[19]
Peyton Jones, S. Beautiful concurrency. In Beautiful Code (2007), A. Oran and G. Wilson, Eds., O'Reilly.
[20]
Peyton Jones, S., Gordon, A., and Finné, S. Concurrent Haskell. POPL'96: Proceedings of the 23rd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages. pp. 295--308, ACM, Jan. 1996.
[21]
Peyton Jones, S. and Wadler, P. Imperative functional programming. POPL'93: Proceedings of the 20th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages. pp. 71--84, ACM, Jan. 1993.
[22]
Rajwar, R., Herlihy, M., and Lai, K. Virtualizing transactional memory. ISCA'05: Proceedings of the 32nd International Symposium on Computer Architecture, pp. 494--505, IEEE Computer Society, June 2005.
[23]
Shavit, N., and Touitou, D. Software transactional memory. PODC'95: Proceedings of the 14th ACM Symposium on Principles of Distributed Computing, pp. 204--213, ACM, Aug. 1995.
[24]
Stone, J.M., Stone, H.S., Heidelberger, P., and Turek, J. Multiple reservations and the Oklahoma update. IEEE Parallel and Distributed Technology 1(4):58--71, 1993.
[25]
Sutter, H. The free lunch is over: A fundamental turn toward concurrency in software. Dr. Dobb's J.; March 2005).

Cited By

View all
  • (2022)Condition-based synchronization in data-centric concurrency controlProceedings of the 37th ACM/SIGAPP Symposium on Applied Computing10.1145/3477314.3507120(1268-1275)Online publication date: 25-Apr-2022
  • (2020)The essence of Bluespec: a core language for rule-based hardware designProceedings of the 41st ACM SIGPLAN Conference on Programming Language Design and Implementation10.1145/3385412.3385965(243-257)Online publication date: 11-Jun-2020
  • (2018)Comparing the performance of concurrent hash tables implemented in HaskellScience of Computer Programming10.1016/j.scico.2018.06.004Online publication date: Jul-2018
  • Show More Cited By

Recommendations

Reviews

Sergei Gorlatch

Transactional memory (TM) is a promising alternative to lock-based parallel programming models on shared-memory architectures. In lock-based programming models, critical memory sections used are locked and unlocked, whether more than one process actually enters this section or not. TM doesn't use locks, but the operations of a process on a critical section are performed within a transaction. Every operation within this transaction is tentative, and all memory read and write operations are logged. At the end of the transaction, its log is validated to assert that no other process changed the view of memory during the transaction. If the validation fails, the transaction is re-executed from scratch (otherwise, memory changes are committed). TM can provide significant gain in performance when race conditions are not very likely to occur, because processes do not have to wait for a lock and the re-execution events are rare. Also, with TM, lock-induced difficulties such as deadlocks are virtually eliminated. Hardware-based TM is not very common, yet. Therefore, software transactional memory (STM), a software-based implementation of TM, is the subject of ongoing research. STM may be integrated with hardware-based implementations to lower costs for TM-enabled systems. In this paper, Harris et al. present an implementation of STM in Haskell. It is an interface built on a newly defined Haskell monad. The interface comprises computation keywords, transactional variables, and exceptions. Currently, this implementation is part of the Glasgow Haskell compiler, so that the reader can immediately verify the paper's content. The key feature of Haskell STM is its ability to compose STM actions to new actions that will also be executed atomically. When using locks to render an action atomic, composing two such actions does not result in an atomic action, because the intermediate state between the two actions is still visible. Haskell STM hides all intermediate states of a composed action, making it truly atomic. Haskell STM is implemented by relying heavily on features specific to functional programming languages such as a strong type system and lazy evaluation that requires the explicit expression of side effects (using monads). With explicit side effects, irrevocable actions can be avoided during a transaction. Consequently, the practical use of Haskell STM seems to be limited to Haskell or at least functional programming languages. While its practical use might be limited, Haskell STM is impressively simple and efficient. The paper is well structured. The main part is a comprehensive introduction to Haskell STM. Many examples show how to use every part of the STM interface. There is also a section on applications of Haskell STM to build higher-level concurrency abstractions. The authors provide a gentle introduction to transactional memory and the most important features of Haskell concerning STM. Nevertheless, the reader needs a profound knowledge of Haskell, or at least of functional programming, in order to understand how the presented STM mechanism works. The paper and the implementation are geared toward Haskell. Haskell programmers will find this paper a valuable resource for concurrent programming. People interested in STM in general might also like it, but they will find that for them, the paper is only of theoretical importance. Regardless, the introduction to TM and the useful compositionality features of Haskell STM make this paper worth reading. Online Computing Reviews Service

Access critical reviews of Computing literature here

Become a reviewer for Computing Reviews.

Comments

Information & Contributors

Information

Published In

cover image Communications of the ACM
Communications of the ACM  Volume 51, Issue 8
Designing games with a purpose
August 2008
92 pages
ISSN:0001-0782
EISSN:1557-7317
DOI:10.1145/1378704
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 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: 01 August 2008
Published in CACM Volume 51, Issue 8

Permissions

Request permissions for this article.

Check for updates

Qualifiers

  • Research-article
  • Popular
  • Refereed

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)339
  • Downloads (Last 6 weeks)89
Reflects downloads up to 05 Jan 2025

Other Metrics

Citations

Cited By

View all
  • (2022)Condition-based synchronization in data-centric concurrency controlProceedings of the 37th ACM/SIGAPP Symposium on Applied Computing10.1145/3477314.3507120(1268-1275)Online publication date: 25-Apr-2022
  • (2020)The essence of Bluespec: a core language for rule-based hardware designProceedings of the 41st ACM SIGPLAN Conference on Programming Language Design and Implementation10.1145/3385412.3385965(243-257)Online publication date: 11-Jun-2020
  • (2018)Comparing the performance of concurrent hash tables implemented in HaskellScience of Computer Programming10.1016/j.scico.2018.06.004Online publication date: Jul-2018
  • (2017)SeerACM Transactions on Computer Systems10.1145/313203635:3(1-41)Online publication date: 14-Nov-2017
  • (2017)Brief AnnouncementProceedings of the ACM Symposium on Principles of Distributed Computing10.1145/3087801.3087866(251-253)Online publication date: 25-Jul-2017
  • (2017)Operation-Level Wait-Free Transactional Memory with Support for Irrevocable OperationsIEEE Transactions on Parallel and Distributed Systems10.1109/TPDS.2017.273487928:12(3570-3583)Online publication date: 9-Nov-2017
  • (2017)Interactive programming in Agda – Objects and graphical user interfacesJournal of Functional Programming10.1017/S095679681600031927Online publication date: 6-Feb-2017
  • (2016)Robotic Middleware Comparison of Real-time Processing and Mutual ExclusionJournal of the Robotics Society of Japan10.7210/jrsj.34.36634:6(366-369)Online publication date: 2016
  • (2016)Lock-free atom garbage collection for multithreaded PrologTheory and Practice of Logic Programming10.1017/S147106841600027216:5-6(950-965)Online publication date: 14-Oct-2016
  • (2016)Concurrent Hash Tables for HaskellProgramming Languages10.1007/978-3-319-45279-1_8(110-124)Online publication date: 17-Sep-2016
  • Show More Cited By

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Digital Edition

View this article in digital edition.

Digital Edition

Magazine Site

View this article on the magazine site (external)

Magazine Site

Login options

Full Access

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media