skip to main content
article

A flexible framework for implementing software transactional memory

Published:16 October 2006Publication History
Skip Abstract Section

Abstract

We describe DSTM2, a Java™ software library that provides a flexible framework for implementing object-based software transactional memory (STM). The library uses transactional factories to transform sequential (unsynchronized) classes into atomic (transactionally synchronized) ones, providing a substantial improvement over the awkward programming interface of our previous DSTM library. Furthermore, researchers can experiment with alternative STM mechanisms by providing their own factories. We demonstrate this flexibility by presenting two factories: one that uses essentially the same mechanisms as the original DSTM (with some enhancements),and another that uses a completely different approach.Because DSTM2 is packaged as a Java library, a wide range of programmers can easily try it out, and the community can begin to gain experience with transactional programming. Furthermore, researchers will be able to use the body of transactional programs that arises from this community experience to test and evaluate different STM mechanisms simply by supplying new transactional factories. We believe that this flexible approach will help to build consensus about the best ways to implement transactions, and will avoid the premature "lock-in" that may arise if STM mechanisms are baked into compilers before such experimentation is done.

References

  1. C. Scott Ananian, Krste Asanovic, Bradley C. Kuszmaul, Charles E. Leiserson, and Sean Lie. Unbounded transactional memory. In Proc. 11th International Symposium on High-Performance Computer Architecture, pages 316--327, February 2005.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. C. Cole and M. P. Herlihy. Snapshots and software transactional memory. Science of Computer Programming, 58(3):310--324, December 2005.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Peter Damron, Alexandra Fedorova, Yossi Lev, Victor Luchangco, Mark Moir, and Dan Nussbaum. Hybrid transactional memory. In Proceedings of the 12th International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS-XII), October 2006.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Apache Software Foundation. Byte-code engineering library. http://jakarta.apache.org/bcel/manual.html.]]Google ScholarGoogle Scholar
  5. Keir Fraser and Tim Harris. Concurrent programming without locks. Submitted for publication.]]Google ScholarGoogle Scholar
  6. Rachid Guerraoui, Maurice Herlihy, and Bastian Pochon. Polymorphic contention management in SXM. In Proceedings of the 19th International Conference on Distributed Computing, September 2005.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Lance Hammond, Vicky Wong, Mike Chen, Brian D. Carlstrom, John D. Davis, Ben Hertzberg, Manohar K. Prabhu, Honggo Wijaya, Christos Kozyrakis, and Kunle Olukotun. Transactional memory coherence and consistency. In Proc. 31st Annual International Symposium on Computer Architecture, June 2004.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Tim Harris and Keir Fraser. Language support for lightweight transactions. In Proceedings of the 18th ACM SIGPLAN Conference on Object-Oriented Programing, Systems, Languages, and Applications, pages 388--402, 2003.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Tim Harris, Simon Marlow, Simon Peyton Jones, and Maurice Herlihy. Composable memory transactions. In Proceedings of the 10th ACM SIGPLAN Symposisum on Principles and Practice of Parallel Programming, 2005.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Maurice Herlihy. http://www.cs.brown.edu/~mph/.]]Google ScholarGoogle Scholar
  11. Maurice Herlihy, Victor Luchangco, and Mark Moir. Obstruction-free synchronization: Double-ended queues as an example. In Proceedings of the 23rd International Conference on Distributed Computing Systems (ICDCS ), pages 522--529, May 2003.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Maurice Herlihy, Victor Luchangco, Mark Moir, and William N. Scherer, III. Software transactional memory for dynamic-sized data structures. In Proceedings of the 22nd Annual ACM Symposium on Principles of Distributed Computing, pages 92--101, 2003.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Maurice Herlihy and J. Eliot B. Moss. Transactional memory: Architectural support for lock-free data structures. In Proc. 20th Annual International Symposium on Computer Architecture, pages 289--300, May 1993.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. W. N. Scherer III and M. L. Scott. Contention management in dynamic software transactional memory. In PODC Workshop on Concurrency and Synchronization in Java Programs, July 2004.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Amos Israeli and Lihu Rappoport. Disjoint-access-parallel implementations of strong shared memory primitives. In Proceedings of the 13th Annual ACM Symposium on Principles of Distributed Computing, pages 151--160, 1994.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. V. J. Marathe, W. N. Scherer III, and M. L. Scott. Design tradeoffs in modern software transactional memory systems. In 7th Workshop on Languages, Compilers, and Run-time Support for Scalable Systems, October 2004.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Virendra Marathe, William Scherer, and Michael Scott. Adaptive software transactional memory. In Proceedings of the 19th International Conference on Distributed Computing, September 2005.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Mark Moir. Practical implementations of non-blocking synchronization primitives. In Proceedings of the 16th Annual ACM Symposium on Principles of Distributed Computing, pages 219--228, 1997.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Kevin E. Moore, Jayaram Bobba, Michelle J. Moravan, Mark D. Hill, and David A. Wood. LogTM: Log-based transactional memory. In Proc. 12th Annual International Symposium on High Performance Computer Architecture, 2006.]]Google ScholarGoogle ScholarCross RefCross Ref
  20. Kevin E. Moore, Mark D. Hill, and David A. Wood. Thread-level transactional memory. Technical Report CS-TR-2005-1524, Dept. of Computer Sciences University of Wisconsin, March 2005.]]Google ScholarGoogle Scholar
  21. J. Eliot B. Moss and Antony L. Hosking. Nested transactional memory: Model and preliminary architecture sketches. In OOPSLA Workshop on Synchronization and Concurrency in Object-Oriented Languages, October 2005.]]Google ScholarGoogle Scholar
  22. William Pugh. Skip lists: A probabilistic alternative to balanced trees. Communications of the ACM, 33(6):668--676, June 1990.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Bratin Saha, Ali-Reza Adl-Tabatabai, Rick Hudson, Chi Cao Minh, and Benjamin Hertzberg. McRT-STM: A high performance software transactional memory system for a multi-core runtime. In Proceedings of the 11th ACM SIGPLAN Symposium on Principle and Practice of Parallel Programs (PPoPP), 2006.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. N. Shavit and D. Touitou. Software transactional memory. Distributed Computing, Special Issue(10):99--116, 1997.]]Google ScholarGoogle Scholar
  25. Sun Microsystems Laboratories. Scalable synchronization research group. http://research.sun.com/scalable.]]Google ScholarGoogle Scholar
  26. Adam Welc, Suresh Jagannathan, and Antony L. Hosking. Transactional monitors for concurrent objects. In Proceedings of the 18th European Conference on Object-Oriented Programming, pages 519--542, June 2004.]]Google ScholarGoogle ScholarCross RefCross Ref

Index Terms

  1. A flexible framework for implementing software 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

              Full Access

              PDF Format

              View or Download as a PDF file.

              PDF

              eReader

              View online with eReader.

              eReader
              About Cookies On This Site

              We use cookies to ensure that we give you the best experience on our website.

              Learn more

              Got it!