Affiliation:
1. ETH Zurich , Zurich, Switzerland
2. Intel Labs Berkeley, Berkeley, CA, USA
Abstract
In this paper we introduce a new method for pessimistically implementing composable, nestable atomic statements. Our mechanism, called shelters, is inspired by the synchronization strategy used in the Jade programming language. Unlike previous lock-based pessimistic approaches, our mechanism does not require a whole-program analysis that computes a global lock order. Further, this mechanism frees us to implement several optimizations, impossible with automatically inserted locks, that are necessary for scaling on recent multi-core systems. Additionally we show how our basic mechanism can be extended to support both open- and closed-nesting of atomic statements, something that, to our knowledge, has not yet been implemented fully-pessimistically in this context. Unlike optimistic, transactional-memory-based approaches, programmers using our mechanism do not have to write compensating actions for open-nesting, or worry about the possibly awkward semantics and performance impact of aborted transactions.
Similar to systems using locks, our implementation requires programmers to annotate the types of objects with the shelters that protect them, and indicate the sections of code to be executed atomically with atomic statements. A static analysis then determines from which shelters protection is needed for the atomic statements to run atomically. We have implemented shelter-based atomic statements for C, and applied our implementation to 12 benchmarks totaling over 200k lines of code including the STAMP benchmark suite, and the sqlite database system. Our implementation's performance is competitive with explicit locking, Autolocker, and a mature software transactional memory implementation.
Publisher
Association for Computing Machinery (ACM)
Subject
Computer Graphics and Computer-Aided Design,Software
Reference39 articles.
1. Memory models for open-nested transactions
2. Agrawal R. Carey M. J. and Livny M. Concurrency control performance modeling: alternatives and implications. Agrawal R. Carey M. J. and Livny M. Concurrency control performance modeling: alternatives and implications.
3. Concurrency control performance modeling: alternatives and implications
4. Allen E. Chase D. Luchangco V. Jr. J.-W. M. S. R. G. L. S. and Tobin-Hochstadt S. The Fortress language specification version 1.0 2008. http://research.sun.com/projects/plrg/fortress.pdf. Allen E. Chase D. Luchangco V. Jr. J.-W. M. S. R. G. L. S. and Tobin-Hochstadt S. The Fortress language specification version 1.0 2008. http://research.sun.com/projects/plrg/fortress.pdf.
5. Unbounded Transactional Memory