skip to main content
research-article

Inferring locks for atomic sections

Published:07 June 2008Publication History
Skip Abstract Section

Abstract

Atomic sections are a recent and popular idiom to support the development of concurrent programs. Updates performed within an atomic section should not be visible to other threads until the atomic section has been executed entirely. Traditionally, atomic sections are supported through the use of optimistic concurrency, either using a transactional memory hardware, or an equivalent software emulation (STM).

This paper explores automatically supporting atomic sections using pessimistic concurrency. We present a system that combines compiler and runtime techniques to automatically transform programs written with atomic sections into programs that only use locking primitives. To minimize contention in the transformed programs, our compiler chooses from several lock granularities, using fine-grain locks whenever it is possible.

This paper formally presents our framework, shows that our compiler is sound (i.e., it protects all shared locations accessed within atomic sections), and reports experimental results.

References

  1. Phoenix compiler infrastructure. http://research.microsoft.com/phoenix/.Google ScholarGoogle Scholar
  2. Colin Blundell, E. Lewis, and Milo Martin. Subtleties of transactional memory atomicity semantics. IEEE Computer Architecture Letters, 5(2), 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Brendan Burns, Kevin Grimaldi, Alexander Kostadinov, Emery D. Berger, and Mark D. Corner. Flux: a language for programming high-performance servers. In Proceedings of the annual conference on USENIX ?06 Annual Technical Conference, pages 13--13, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Chi Cao Minh, Martin Trautmann, JaeWoong Chung, Austen McDonald, Nathan Bronson, Jared Casper, Christos Kozyrakis, and Kunle Olukotun. An effective hybrid transactional memory system with strong isolation guarantees. In Proceedings of the International Symposium on Computer Architecture, Jun 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Luis Ceze, Pablo Montesinos, Christoph von Praun, and Josep Torrellas. Colorama: Architectural support for data-centric synchronization. In Proceedings of the International Symposium on High Performance Computer Architecture, pages 133--144, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Sigmund Cherem, Trishul Chilimbi, and Sumit Gulwani. Inferring locks for atomic sections. Technical Report MSR-TR-2007-111, MSR, August 2007.Google ScholarGoogle Scholar
  7. Dave Dice, Ori Shalev, and Nir Shavit. Transactional locking ii. In Proceedings of the 20th International Symposium on Distributed Computing (DISC), Stockholm, Sweeden, September 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Michael Emmi, Jeffrey S. Fischer, Ranjit Jhala, and Rupak Majumdar. Lock allocation. In Proceedings of the ACM Symposium on the Principles of Programming Languages, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Keir Fraser and Tim Harris. Concurrent programming without locks. ACM Transactions on Computer Systems, 25(2), 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Richard L. Halpert, Christopher J. F. Pickett, and Clark Verbrugge. Component-based lock allocation. In Proceedings of the International Conference on Parallel Architectures and Compilation Techniques, September 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. 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 Proceedings of the International Symposium on Computer Architecture, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Maurice Herlihy and J. Eliot B. Moss. Transactional memory: architectural support for lock-free data structures. In Proceedings of the International Symposium on Computer Architecture, San Diego, CA, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Michael Hicks, Jeffrey S. Foster, and Polyvios Prattikakis. Lock inference for atomic sections. In ACM SIGPLAN Workshop on Languages, Compilers, and Hardware Support for Transactional Computing, June 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Benjamin Hindman and Dan Grossman. Atomicity via source-tosource translation. In ACM SIGPLAN Workshop on Memory Systems Performance and Correctness, October 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. R. Lorie J. Gray and G.F. Putzolu. Granularity of locks in a shared database. In Proceedings of International Conference on Very Large Databases, 1975. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. R. Lorie J. Gray, G.F. Putzolu, and I.L. Traiger. Granularity of locks and degrees of consistency. In Modeling in Data Base Management Systems, G.M. Nijssen ed., North Holland Pub., 1976.Google ScholarGoogle Scholar
  17. 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 ACM SIGPLAN Workshop on Languages, Compilers, and Hardware Support for Transactional Computing, Jun 2006.Google ScholarGoogle Scholar
  18. 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 ACM SIGPLAN Workshop on Languages, Compilers, and Hardware Support for Transactional Computing, Jun 2006.Google ScholarGoogle Scholar
  19. T. Reps, S. Horowitz, and M. Sagiv. Precise interprocedural dataflow analysis via graph reachability. In Proceedings of the ACM Symposium on the Principles of Programming Languages. ACM, January 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. B. Saha, A. Adl-Tabatabai, R. L. Hudson, C. Cao Minh, and B. Hertzberg. Mcrt-stm: a high performance software transactional memory system for a multi-core runtime. In Proceedings of the ACM SIGPLAN symposium on Principles and practice of parallel programming, pages 187--197, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Nir Shavit and Dan Touitou. Software transactional memory. In Proceedings of the ACM symposium on Principles of Distributed Computing, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Bjarne Steensgaard. Points-to analysis in almost linear time. In Proceedings of the ACM Symposium on the Principles of Programming Languages, St. Petersburg Beach, FL, Jan 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Joseph Uniejewski. SPEC Benchmark Suite: Designed for today?s advanced systems. SPEC Newsletter Vol 1, Issue 1, SPEC, Fall 1989.Google ScholarGoogle Scholar
  24. Mandana Vaziri, Frank Tip, and Julian Dolby. Associating synchronization constraints with data in an object-oriented language. In Proceedings of the ACM Symposium on the Principles of Programming Languages, January 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Inferring locks for atomic sections

        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

        • Published in

          cover image ACM SIGPLAN Notices
          ACM SIGPLAN Notices  Volume 43, Issue 6
          PLDI '08
          June 2008
          382 pages
          ISSN:0362-1340
          EISSN:1558-1160
          DOI:10.1145/1379022
          Issue’s Table of Contents
          • cover image ACM Conferences
            PLDI '08: Proceedings of the 29th ACM SIGPLAN Conference on Programming Language Design and Implementation
            June 2008
            396 pages
            ISBN:9781595938602
            DOI:10.1145/1375581
            • General Chair:
            • Rajiv Gupta,
            • Program Chair:
            • Saman Amarasinghe

          Copyright © 2008 ACM

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          • Published: 7 June 2008

          Check for updates

          Qualifiers

          • research-article

        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!