skip to main content
research-article

A comprehensive strategy for contention management in software transactional memory

Published:14 February 2009Publication History
Skip Abstract Section

Abstract

In Software Transactional Memory (STM), contention management refers to the mechanisms used to ensure forward progress--to avoid livelock and starvation, and to promote throughput and fairness. Unfortunately, most past approaches to contention management were designed for obstruction-free STM frameworks, and impose significant constant-time overheads. Priority-based approaches in particular typically require that reads be visible to all transactions, an expensive property that is not easy to support in most STM systems.

In this paper we present a comprehensive strategy for contention management via fair resolution of conflicts in an STM with invisible reads. Our strategy depends on (1) lazy acquisition of ownership, (2) extendable timestamps, and (3) an efficient way to capture both priority and conflicts. We introduce two mechanisms--one using Bloom filters, the other using visible read bits--that implement point (3). These mechanisms unify the notions of conflict resolution, inevitability, and transaction retry. They are orthogonal to the rest of the contention management strategy, and could be used in a wide variety of hardware and software TM systems. Experimental evaluation demonstrates that the overhead of the mechanisms is low, particularly when conflicts are rare, and that our strategy as a whole provides good throughput and fairness, including livelock and starvation freedom, even for challenging workloads.

References

  1. M. Abadi, A. Birrell, T. Harris, and M. Isard. Semantics of Transactional Memory and Automatic Mutual Exclusion. In Conf. Record of the 35th ACM Symp. on Principles of Programming Languages, San Francisco, CA, Jan. 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. B. H. Bloom. Space/Time Trade-Off in Hash Coding with Allowable Errors. Comm. of the ACM, 13(7):422--426, July 1970. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. J. Bobba, K. E. Moore, H. Volos, L. Yen, M. D. Hill, M. M. Swift, and D. A.Wood. Performance Pathologies in Hardware Transactional Memory. In Proc. of the 34th Intl. Symp. on Computer Architecture, San Diego, CA, June 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. D. Dice, O. Shalev, and N. Shavit. Transactional Locking II. In Proc. of the 20th Intl. Symp. on Distributed Computing, Stockholm, Sweden, Sept. 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. A. Dragojević, R. Guerraoui, and M. Kapałka. Dividing Transactional Memories by Zero. In Proc. of the 3rd ACM SIGPLAN Workshop on Transactional Computing, Salt Lake City, UT, Feb. 2008.Google ScholarGoogle Scholar
  6. P. Felber, T. Riegel, and C. Fetzer. Dynamic Performance Tuning of Word-Based Software Transactional Memory. In Proc. of the 13th ACM Symp. on Principles and Practice of Parallel Programming, Salt Lake City, UT, Feb. 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. J. Gottschlich and D. A. Connors. Extending Contention Managers for User-Defined Priority-Based Transactions. In Workshop on Exploiting Parallelism with Transactional Memoryand other Hardware Assisted Methods (EPHAM), Boston, MA, Apr. 2008. In conjunction with phCGO.Google ScholarGoogle Scholar
  8. R. Guerraoui, M. Herlihy, and B. Pochon. Toward a Theory of Transactional Contention Managers. In Proc. of the 24th ACM Symp. on Principles of Distributed Computing, Las Vegas, NV, Aug. 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. T. Harris, S. Marlow, S. P. Jones, and M. Herlihy. Composable Memory Transactions. In Proc. of the 10th ACM Symp. on Principles and Practice of Parallel Programming, Chicago, IL, June 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. M. Herlihy, V. Luchangco, M. Moir, and W. N. Scherer III. Software Transactional Memory for Dynamic-sized Data Structures. In Proc. of the 22nd ACM Symp. on Principles of Distributed Computing, Boston, MA, July 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. 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 Proc. of the 1st ACM SIGPLAN Workshop on Transactional Computing, Ottawa, ON, Canada, June 2006. Expanded version available as TR 893, Dept. of Computer Science, Univ. of Rochester, Mar. 2006.Google ScholarGoogle Scholar
  12. 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 Proc. of the 20th Annual ACM Symp. on Parallelism in Algorithms and Architectures, Munich, Germany, June 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. K. F. Moore and D. Grossman. High-Level Small-Step Operational Semantics for Transactions. In Conf. Record of the 35th ACM Symp. on Principles of Programming Languages, San Francisco, CA, Jan. 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. M. Olszewski, J. Cutler, and J. G. Steffan. Judo STM: A Dynamic Binary-Rewriting Approach to Software Transactional Memory. In Proc. of the 16th Intl. Conf. on Parallel Architectures and Compilation Techniques, Brasov, Romania, Sept. 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. T. Riegel, C. Fetzer, and P. Felber. Time-based Transactional Memory with Scalable Time Bases. In Proc. of the 19th Annual ACM Symp. on Parallelism in Algorithms and Architectures, San Diego, CA, June 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. W. N. Scherer III and M. L. Scott. Advanced Contention Management for Dynamic Software TransactionalMemory. In Proc. of the 24th ACM Symp. on Principles of Distributed Computing, Las Vegas, NV, July 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Y. Smaragdakis, A. Kay, R. Behrends, and M. Young. Transactions with Isolation and Cooperation. In Proc. of the 22nd OOPSLA, Montréal, PQ, Canada, Oct.2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. M. F. Spear, V. J. Marathe, W. N. Scherer III, and M. L. Scott. Conflict Detection and Validation Strategies for Software Transactional Memory. In Proc. of the 20th Intl. Symp. on Distributed Computing, Stockholm, Sweden, Sept. 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. M. F. Spear, M. Silverman, L. Dalessandro, M. M. Michael, and M. L. Scott. Implementing and Exploiting Inevitability in Software Transactional Memory. In Proc. of the 2008 Intl. Conf. on Parallel Processing, Portland, OR, Sept. 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. M. F. Spear, M. M. Michael, and M. L. Scott. Inevitability Mechanisms for Software Transactional Memory. In Proc. of the 3rd ACM SIGPLAN Workshop on Transactional Computing, Salt Lake City, UT, Feb. 2008.Google ScholarGoogle Scholar
  21. M. F. Spear, L. Dalessandro, V. J. Marathe, and M. L. Scott. Ordering-Based Semantics for Software Transactional Memory. In Proc. of the 12th Intl. Conf. on Principles of Distributed Systems, Luxor, Egypt, Dec. 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. M. F. Spear, M. M. Michael, and C. von Praun. RingSTM: Scalable Transactions with a Single Atomic Instruction. In Proc. of the 20th Annual ACM Symp. on Parallelism inAlgorithms and Architectures, Munich, Germany, June 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. M. F. Spear, A. Sveikauskas, and M. L. Scott. Transactional Memory Retry Mechanisms (Brief Announcement). In Proc. of the 27th ACM Symp. on Principles of Distributed Computing, Toronto, ON, Canada, Aug. 2008. Extended version available as TR 935, Dept. ofComputer Science, Univ. of Rochester, July 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. A. Welc, B. Saha, and A.-R. Adl-Tabatabai. Irrevocable Transactions and Their Applications. In Proc. of the 20th Annual ACM Symp. on Parallelism in Algorithms and Architectures, Munich, Germany, June 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. C. Zilles and R. Rajwar. Transactional Memory and the Birthday Paradox (Brief Announcement). In Proc. of the 19th Annual ACM Symp. on Parallelism in Algorithms and Architectures, San Diego, CA, June 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. A comprehensive strategy for contention management in 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!