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.
- Phoenix compiler infrastructure. http://research.microsoft.com/phoenix/.Google Scholar
- Colin Blundell, E. Lewis, and Milo Martin. Subtleties of transactional memory atomicity semantics. IEEE Computer Architecture Letters, 5(2), 2006. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- Sigmund Cherem, Trishul Chilimbi, and Sumit Gulwani. Inferring locks for atomic sections. Technical Report MSR-TR-2007-111, MSR, August 2007.Google Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- Keir Fraser and Tim Harris. Concurrent programming without locks. ACM Transactions on Computer Systems, 25(2), 2007. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- Benjamin Hindman and Dan Grossman. Atomicity via source-tosource translation. In ACM SIGPLAN Workshop on Memory Systems Performance and Correctness, October 2006. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
- 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 Scholar
- 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 Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- Nir Shavit and Dan Touitou. Software transactional memory. In Proceedings of the ACM symposium on Principles of Distributed Computing, 1995. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- Joseph Uniejewski. SPEC Benchmark Suite: Designed for today?s advanced systems. SPEC Newsletter Vol 1, Issue 1, SPEC, Fall 1989.Google Scholar
- 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 Scholar
Digital Library
Index Terms
Inferring locks for atomic sections
Recommendations
Inferring locks for atomic sections
PLDI '08: Proceedings of the 29th ACM SIGPLAN Conference on Programming Language Design and ImplementationAtomic 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, ...
Refined transactional lock elision
PPoPP '16Transactional lock elision (TLE) is a well-known technique that exploits hardware transactional memory (HTM) to introduce concurrency into lock-based software. It achieves that by attempting to execute a critical section protected by a lock in an atomic ...
Moverness for Locks and Transactions
TASE '12: Proceedings of the 2012 Sixth International Symposium on Theoretical Aspects of Software EngineeringLocks are pervasive in multithreaded code. For software transactional memory (STM) to be widely adopted there must be a consensus on a semantics for programs that entail both locks and transactions, particularly for weakly isolated STMs. For instance, ...







Comments