skip to main content
research-article

Low-overhead software transactional memory with progress guarantees and strong semantics

Published:24 January 2015Publication History
Skip Abstract Section

Abstract

Software transactional memory offers an appealing alternative to locks by improving programmability, reliability, and scalability. However, existing STMs are impractical because they add high instrumentation costs and often provide weak progress guarantees and/or semantics. This paper introduces a novel STM called LarkTM that provides three significant features. (1) Its instrumentation adds low overhead except when accesses actually conflict, enabling low single-thread overhead and scaling well on low-contention workloads. (2) It uses eager concurrency control mechanisms, yet naturally supports flexible conflict resolution, enabling strong progress guarantees. (3) It naturally provides strong atomicity semantics at low cost. LarkTM's design works well for low-contention workloads, but adds significant overhead under higher contention, so we design an adaptive version of LarkTM that uses alternative concurrency control for high-contention objects. An implementation and evaluation in a Java virtual machine show that the basic and adaptive versions of LarkTM not only provide low single-thread overhead, but their multithreaded performance compares favorably with existing high-performance STMs.

References

  1. M. Abadi, A. Birrell, T. Harris, and M. Isard. Semantics of Transactional Memory and Automatic Mutual Exclusion. In POPL, pages 63–74, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. M. Abadi, T. Harris, and M. Mehrara. Transactional Memory with Strong Atomicity Using Off-the-Shelf Memory Protection Hardware. In PPoPP, pages 185–196, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. S. V. Adve and H.-J. Boehm. Memory Models: A Case for Rethinking Parallel Languages and Hardware. CACM, 53:90–101, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. B. Alpern, S. Augart, S. M. Blackburn, M. Butrico, A. Cocchi, P. Cheng, J. Dolby, S. Fink, D. Grove, M. Hind, K. S. McKinley, M. Mergen, J. E. B. Moss, T. Ngo, and V. Sarkar. The Jikes Research Virtual Machine Project: Building an Open-Source Research Community. IBM Systems Journal, 44:399–417, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. L. Baugh, N. Neelakantam, and C. Zilles. Using Hardware Memory Protection to Build a High-Performance, Strongly-Atomic Hybrid Transactional Memory. In ISCA, pages 115–126, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. M. D. Bond, M. Kulkarni, M. Cao, M. Zhang, M. Fathi Salmi, S. Biswas, A. Sengupta, and J. Huang. Octet: Capturing and Controlling Cross-Thread Dependences Efficiently. In OOPSLA, pages 693–712, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. N. G. Bronson, C. Kozyrakis, and K. Olukotun. Feedback-Directed Barrier Optimization in a Strongly Isolated STM. In POPL, pages 213–225, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. I. Calciu, J. Gottschlich, T. Shpeisman, G. Pokam, and M. Herlihy. Invyswell: A Hybrid Transactional Memory for Haswell’s Restricted Transactional Memory. In PACT, pages 187–200, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. M. Cao, M. Zhang, and M. D. Bond. Drinking from Both Glasses: Adaptively Combining Pessimistic and Optimistic Synchronization for Efficient Parallel Runtime Support. In WoDet, 2014.Google ScholarGoogle Scholar
  10. C. Cao Minh, J. Chung, C. Kozyrakis, and K. Olukotun. STAMP: Stanford Transactional Applications for Multi-Processing. In IISWC, 2008.Google ScholarGoogle Scholar
  11. C. Cascaval, C. Blundell, M. Michael, H. W. Cain, P. Wu, S. Chiras, and S. Chatterjee. Software Transactional Memory: Why Is It Only a Research Toy? CACM, 51(11):40–46, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. L. Dalessandro and M. L. Scott. Strong Isolation is a Weak Idea. In TRANSACT, 2009.Google ScholarGoogle Scholar
  13. L. Dalessandro and M. L. Scott. Sandboxing Transactional Memory. In PACT, pages 171–180, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. L. Dalessandro, M. L. Scott, and M. F. Spear. Transactions as the Foundation of a Memory Consistency Model. In DISC, pages 20–34, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. L. Dalessandro, M. F. Spear, and M. L. Scott. NOrec: Streamlining STM by Abolishing Ownership Records. In PPoPP, pages 67–78, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. M. de Kruijf and K. Sankaralingam. Idempotent Code Generation: Implementation, Analysis, and Evaluation. In CGO, pages 1–12, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. B. Demsky and A. Dash. Evaluating Contention Management Using Discrete Event Simulation. In TRANSACT, 2010.Google ScholarGoogle Scholar
  18. D. Dice, O. Shalev, and N. Shavit. Transactional Locking II. In DISC, pages 194–208, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. D. Dice and N. Shavit. TLRW: Return of the Read-Write Lock. In SPAA, pages 284–293, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. A. Dragojevi´c, P. Felber, V. Gramoli, and R. Guerraoui. Why STM Can Be More than a Research Toy. CACM, 54:70–77, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. A. Dragojevi´c, R. Guerraoui, and M. Kapalka. Stretching Transactional Memory. In PLDI, pages 155–165, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. J. E. Gottschlich, M. Vachharajani, and J. G. Siek. An Efficient Software Transactional Memory Using Commit-Time Invalidation. In CGO, pages 101–110, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. R. Guerraoui, M. Herlihy, and B. Pochon. Toward a Theory of Transactional Contention Managers. In PODC, pages 258–264, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. L. Hammond, V. Wong, M. Chen, B. D. Carlstrom, J. D. Davis, B. Hertzberg, M. K. Prabhu, H. Wijaya, C. Kozyrakis, and K. Olukotun. Transactional Memory Coherence and Consistency. In ISCA, pages 102–113, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. T. Harris and K. Fraser. Language Support for Lightweight Transactions. In OOPSLA, pages 388–402, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. T. Harris and K. Fraser. Revocable Locks for Non-Blocking Programming. In PPoPP, pages 72–82, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. T. Harris, J. Larus, and R. Rajwar. Transactional Memory. Morgan and Claypool Publishers, 2nd edition, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. T. Harris, M. Plesko, A. Shinnar, and D. Tarditi. Optimizing Memory Transactions. In PLDI, pages 14–25, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. A. Hassan, R. Palmieri, and B. Ravindran. Remote Invalidation: Optimizing the Critical Path of Memory Transactions. In IPDPS, pages 187–197, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. M. Herlihy, V. Luchangco, M. Moir, and W. N. Scherer, III. Software Transactional Memory for Dynamic-Sized Data Structures. In PODC, pages 92–101, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. M. Herlihy and J. E. B. Moss. Transactional Memory: Architectural Support for Lock-Free Data Structures. In ISCA, pages 289–300, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. B. Hindman and D. Grossman. Atomicity via Source-to-Source Translation. In MSPC, pages 82–91, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. K. Kawachiya, A. Koseki, and T. Onodera. Lock Reservation: Java Locks Can Mostly Do Without Atomic Operations. In OOPSLA, pages 130–141, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. G. Korland, N. Shavit, and P. Felber. Deuce: Noninvasive Software Transactional Memory in Java. Transactions on HiPEAC, 5(2), 2010.Google ScholarGoogle Scholar
  35. V. J. Marathe, M. F. Spear, C. Heriot, A. Acharya, D. Eisenstat, W. N. Scherer III, and M. L. Scott. Lowering the Overhead of Nonblocking Software Transactional Memory. In TRANSACT, 2006.Google ScholarGoogle Scholar
  36. V. Menon, S. Balensiefer, T. Shpeisman, A.-R. Adl-Tabatabai, R. L. Hudson, B. Saha, and A. Welc. Practical Weak-Atomicity Semantics for Java STM. In SPAA, pages 314–325, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. V. Menon, S. Balensiefer, T. Shpeisman, A.-R. Adl-Tabatabai, R. L. Hudson, B. Saha, and A. Welc. Single Global Lock Semantics in a Weakly Atomic STM. In TRANSACT, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. K. E. Moore, J. Bobba, M. J. Moravan, M. D. Hill, and D. A. Wood. LogTM: Log-based Transactional Memory. In HPCA, pages 254–265, 2006.Google ScholarGoogle ScholarCross RefCross Ref
  39. K. F. Moore and D. Grossman. High-Level Small-Step Operational Semantics for Transactions. In POPL, pages 51–62, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. N. Neelakantam, R. Rajwar, S. Srinivas, U. Srinivasan, and C. Zilles. Hardware Atomicity for Reliable Software Speculation. In ISCA, pages 174–185, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. M. Olszewski, J. Cutler, and J. G. Steffan. JudoSTM: A Dynamic Binary-Rewriting Approach to Software Transactional Memory. In PACT, pages 365–375, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. V. Pankratius and A.-R. Adl-Tabatabai. A Study of Transactional Memory vs. Locks in Practice. In SPAA, pages 43–52, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  43. C. G. Ritson and F. R. Barnes. An Evaluation of Intel’s Restricted Transactional Memory for CPAs. In CPA, pages 271–292, 2013.Google ScholarGoogle Scholar
  44. K. Russell and D. Detlefs. Eliminating Synchronization-Related Atomic Operations with Biased Locking and Bulk Rebiasing. In OOPSLA, pages 263–272, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  45. B. Saha, A.-R. Adl-Tabatabai, R. L. Hudson, C. C. Minh, and B. Hertzberg. McRT-STM: A High Performance Software Transactional Memory System for a Multi-Core Runtime. In PPoPP, pages 187–197, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  46. D. J. Scales, K. Gharachorloo, and C. A. Thekkath. Shasta: A Low Overhead, Software-Only Approach for Supporting Fine-Grain Shared Memory. In ASPLOS, pages 174–185, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  47. F. T. Schneider, V. Menon, T. Shpeisman, and A.-R. Adl-Tabatabai. Dynamic Optimization for Efficient Strong Atomicity. In OOPSLA, pages 181–194, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  48. A. Sengupta, S. Biswas, M. Zhang, M. D. Bond, and M. Kulkarni. Hybrid Static–Dynamic Analysis for Statically Bounded Region Serializability. In ASPLOS, 2015. To appear.Google ScholarGoogle ScholarDigital LibraryDigital Library
  49. T. Shpeisman, V. Menon, A.-R. Adl-Tabatabai, S. Balensiefer, D. Grossman, R. L. Hudson, K. F. Moore, and B. Saha. Enforcing Isolation and Ordering in STM. In PLDI, pages 78–88, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  50. M. F. Spear, L. Dalessandro, V. J. Marathe, and M. L. Scott. A Comprehensive Strategy for Contention Management in Software Transactional Memory. In PPoPP, pages 141–150, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  51. M. F. Spear, V. J. Marathe, L. Dalessandro, and M. L. Scott. Privatization Techniques for Software Transactional Memory. In PODC, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  52. M. F. Spear, M. M. Michael, and C. von Praun. RingSTM: Scalable Transactions with a Single Atomic Instruction. In SPAA, pages 275– 284, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  53. T. Usui, R. Behrends, J. Evans, and Y. Smaragdakis. Adaptive Locks: Combining Transactions and Locks for Efficient Concurrency. In PACT, pages 3–14, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  54. C. von Praun and T. R. Gross. Object Race Detection. In OOPSLA, pages 70–82, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  55. J.-T. Wamhoff, C. Fetzer, P. Felber, E. Rivière, and G. Muller. Fast-Lane: Improving Performance of Software Transactional Memory for Low Thread Counts. In PPoPP, pages 113–122, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  56. A. Wang, M. Gaudet, P. Wu, J. N. Amaral, M. Ohmacht, C. Barton, R. Silvera, and M. Michael. Evaluation of Blue Gene/Q Hardware Support for Transactional Memories. In PACT, pages 127–136, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  57. C. Wang, W.-Y. Chen, Y. Wu, B. Saha, and A.-R. Adl-Tabatabai. Code Generation and Optimization for Transactional Memory Constructs in an Unmanaged Language. In CGO, pages 34–48, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  58. R. M. Yoo, C. J. Hughes, K. Lai, and R. Rajwar. Performance Evaluation of Intel Transactional Synchronization Extensions for High-Performance Computing. In SC, pages 19:1–19:11, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  59. R. M. Yoo, Y. Ni, A. Welc, B. Saha, A.-R. Adl-Tabatabai, and H.-H. S. Lee. Kicking the Tires of Software Transactional Memory: Why the Going Gets Tough. In SPAA, pages 265–274, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  60. F. Zyulkyarov, S. Stipic, T. Harris, O. S. Unsal, A. Cristal, I. Hur, and M. Valero. Discovering and Understanding Performance Bottlenecks in Transactional Applications. In PACT, pages 285–294, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Low-overhead software transactional memory with progress guarantees and strong semantics

    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!