Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
research-article

Composable, nestable, pessimistic atomic statements

Published: 22 October 2011 Publication History

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.

References

[1]
Agrawal, K., Leiserson, C. E., and Sukha, J. Memory models for open-nested transactions. In MSPC'06.
[2]
Agrawal, R., Carey, M. J., and Livny, M. Concurrency control performance modeling: alternatives and implications.
[3]
ACM Trans. Database Syst. 12, 4 (1987), 609--654.
[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.
[5]
Ananian, C. S., Asanovic, K., Kuszmaul, B. C., Leiserson, C. E., and Lie, S. Unbounded transactional memory. In HPCA'05, pp. 316--327.
[6]
Anderson, Z., Gay, D., Ennals, R., and Brewer, E. SharC: checking data sharing strategies for multithreaded C+. In PLDI'08, pp. 149--158.
[7]
Barnes, J., and Hut, P. A hierarchical O(N log N) force-calculation algorithm. Nature 324 (Dec. 1986), 446--449.
[8]
Beeri, C., Bernstein, P. A., and Goodman, N. A model for concurrency in nested transactions systems. J. ACM 36, 2 (1989), 230--269.
[9]
Bernstein, P. A., Hadzilacos, V., and Goodman, N. Concurrency control and recovery in database systems. Addison-Wesley Longman Publishing Co., Inc., Boston, MA, USA, 1987.
[10]
Boehm, H.-J. Transactional memory should be an implementation technique, not a programming interface. In HotPar'09.
[11]
Boyapati, C. SafeJava: A Unified Type System for Safe Programming. PhD thesis, MIT.
[12]
Cao Minh, C., Chung, J., Kozyrakis, C., and Olukotun, K. STAMP: Stanford transactional applications for multi-processing. In IISWC'08.
[13]
Chamberlain, B., Callahan, D., and Zima, H. Parallel programmability and the chapel language.Int. J. High Perform. Comput. Appl. 21, 3 (2007), 291--312.
[14]
Cherem, S., Chilimbi, T., and Gulwani, S. Inferring locks for atomic sections. In PLDI'08.
[15]
Ebcioglu, K., Saraswat, V., and Sarkar, V. X10: Programming for hierarchical parallelism and non-uniform data access. In OOPSLA'04.
[16]
Flanagan, C., and Abadi, M. Object types against races. In Conference on Concurrent Theory (CONCUR) (1999).
[17]
Fraser, K., and Harris, T. Concurrent programming without locks. ACM Trans. Comput. Syst. 25, 2 (2007), 5.
[18]
Goodman, J., Greenberg, A. G., Madras, N., and March, P. Stability of binary exponential backoff. J. ACM 35, 3 (1988), 579--602.
[19]
Grossman, D. The transactional memory / garbage collection analogy. In OOPSLA'07, pp. 695--706.
[20]
Hicks, M., Foster, J. S., and Pratikakis, P. Inferring locking for atomic sections. In TRANSACT'06.
[21]
Hindman, B., and Grossman, D. Atomicity via source-to-source translation. In MSPC'06.
[22]
Intel. Intel C++ STM Compiler Prototype Edition 3.0, 2008.
[23]
kernel.org. Kernel bug tracker. http://bugzilla.kernel.org/.
[24]
Marathe, V., Spear, M., Heriot, C., A.Acharya, Eisenstat, D., III, W. S., and Scott, M. Lowering the overhead of software transactional memory. In TRANSACT'06.
[25]
Martin, J.-P., Hicks, M., Costa, M., Akritidis, P., and Castro, M. Dynamically checking ownership policies in concurrent C/C++ programs. In POPL'10, pp. 457--470.
[26]
McCloskey, B., Zhou, F., Gay, D., and Brewer, E. Autolocker: synchronization inference for atomic sections. In POPL'06, pp. 346--358.
[27]
Moss, J. E. B. Open nested transactions : Semantics and support. In Workshop on Memory Performance Issues (WMPI) (2006).
[28]
mozilla.org. Bugzilla@mozilla bug tracker. http://bugzilla.mozilla.org/.
[29]
Naik, M., and Aiken, A. Conditional must not aliasing for static race detection. In PLDI'07, pp. 327--338.
[30]
Necula, G. C., McPeak, S., and Weimer, W. CIL: Intermediate language and tools for the analysis of C programs. In CC'04, pp. 213--228. http://cil.sourceforge.net/.
[31]
Ni, Y., Menon, V. S., Adl-Tabatabai, A.-R., Hosking, A. L., Hudson, R. L., Moss, J. E. B., Saha, B., and Shpeisman, T. Open nesting in software transactional memory. In PPoPP'07, pp. 68--78.
[32]
Rajwar, R., Herlihy, M., and Lai, K. Virtualizing transactional memory. In ISCA'05, pp. 494--505.
[33]
Rinard, M. C., and Lam, M. S. Semantic foundations of Jade. In POPL '92, pp. 105--118.
[34]
Rinard, M. C., and Lam, M. S. The design, implementation, and evaluation of jade. ACM Trans. Program. Lang. Syst. 20, 3 (1998), 483--545.
[35]
Rossbach, C. J., Hofmann, O. S., and Witchel, E. Is transactional memory programming actually easier? In PPoPP'10, pp. 47--56.
[36]
Saha, B., Adl-Tabatabai, A.-R., Hudson, R. L., Minh, C. C., and Hertzberg, B. Mcrt-stm: a high performance software transactional memory system for a multi-core runtime. In PPoPP'06, pp. 187--197.
[37]
Shavit, N., and Touitou, D. Software transactional memory. In PODC'95, pp. 204--213.
[38]
Silberschatz, A., Galvin, P. B., and Gagne, G. Operating System Concepts, 6th ed. John Wiley & Sons, Inc., New York, NY, USA, 2001.
[39]
Woo, S. C., Ohara, M., Torrie, E., Shingh, J. P., and Gupta, A. The SPLASH-2 Programs: Characterization and Methodological Considerations. In ISCA'95, pp. 24--36.

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM SIGPLAN Notices
ACM SIGPLAN Notices  Volume 46, Issue 10
OOPSLA '11
October 2011
1063 pages
ISSN:0362-1340
EISSN:1558-1160
DOI:10.1145/2076021
Issue’s Table of Contents
  • cover image ACM Conferences
    OOPSLA '11: Proceedings of the 2011 ACM international conference on Object oriented programming systems languages and applications
    October 2011
    1104 pages
    ISBN:9781450309400
    DOI:10.1145/2048066
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 22 October 2011
Published in SIGPLAN Volume 46, Issue 10

Check for updates

Author Tags

  1. atomic statements
  2. concurrency
  3. locks

Qualifiers

  • Research-article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • 0
    Total Citations
  • 238
    Total Downloads
  • Downloads (Last 12 months)2
  • Downloads (Last 6 weeks)0
Reflects downloads up to 09 Feb 2025

Other Metrics

Citations

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media