[go: up one dir, main page]
More Web Proxy on the site http://driver.im/ skip to main content
10.1145/1449764.1449779acmconferencesArticle/Chapter ViewAbstractPublication PagessplashConference Proceedingsconference-collections
research-article

Dynamic optimization for efficient strong atomicity

Published: 19 October 2008 Publication History

Abstract

Transactional memory (TM) is a promising concurrency control alternative to locks. Recent work has highlighted important memory model issues regarding TM semantics and exposed problems in existing TM implementations. For safe, managed languages such as Java, there is a growing consensus towards strong atomicity semantics as a sound, scalable solution. Strong atomicity has presented a challenge to implement efficiently because it requires instrumentation of non-transactional memory accesses, incurring significant overhead even when a program makes minimal or no use of transactions. To minimize overhead, existing solutions require either a sophisticated type system, specialized hardware, or static whole-program analysis. These techniques do not translate easily into a production setting on existing hardware. In this paper, we present novel dynamic optimizations that significantly reduce strong atomicity overheads and make strong atomicity practical for dynamic language environments. We introduce analyses that optimistically track which non-transactional memory accesses can avoid strong atomicity instrumentation, and we describe a lightweight speculation and recovery mechanism that applies these analyses to generate speculatively-optimized but safe code for strong atomicity in a dynamically-loaded environment. We show how to implement these mechanisms efficiently by leveraging existing dynamic optimization infrastructure in a Java system. Measurements on a set of transactional and non-transactional Java workloads demonstrate that our techniques substantially reduce the overhead of strong atomicity from a factor of 5x down to 10% or less over an efficient weak atomicity baseline.

References

[1]
ABADI, M., BIRRELL, A., HARRIS, T., AND ISARD, M. Semantics of transactional memory and automatic mutual exclusion. In POPL 2008.
[2]
ADL-TABATABAI, A.-R., LEWIS, B. T., MENON, V. S., MURPHY, B. R., SAHA, B., AND SHPEISMAN, T. Compiler and runtime support for efficient software transactional memory. In PLDI 2006.
[3]
BLUNDELL, C., LEWIS, E. C., AND MARTIN, M. Subtleties of transactional memory atomicity semantics. Computer Architecture Letters 5, 2 (Nov. 2006).
[4]
BORISOV, N., JOHNSON, R., SASTRY, N., AND WAGNER, D. Fixing races for fun and profit: how to abuse atime. In SSYM 2005 (Berkeley, CA, USA, 2005), USENIX Association, pp. 20--20.
[5]
BOYAPATI, C., LEE, R., AND RINARD, M. Ownership types for safe programming: preventing data races and deadlocks. In OOPSLA 2002.
[6]
BOYAPATI, C., SALCIANU, A., WILLIAM BEEBEE, J., AND RINARD, M. Ownership types for safe region-based memory management in real-time Java. In PLDI 2003 (2003).
[7]
CHOI, J.-D., GUPTA, M., SERRANO, M. J., SREEDHAR, V. C., AND MIDKIFF, S. P. Stack allocation and synchronization optimizations for Java using escape analysis. ACM Trans. Program. Lang. Syst. 25, 6 (2003).
[8]
CHOI, J.-D., LEE, K., LOGINOV, A., O'CALLAHAN, R., SARKAR, V., AND SRIDHARAN, M. Efficient and precise datarace detection for multithreaded object-oriented programs. In PLDI 2002.
[9]
CLARKE, D., RICHMOND, M., AND NOBLE, J. Saving the world from bad beans: deployment-time confinement checking. In OOPSLA 2003.
[10]
CLARKE, D. G., POTTER, J. M., AND NOBLE, J. Ownership types for flexible alias protection. In OOPSLA 1998.
[11]
DEAN, J., GROVE, D., AND CHAMBERS, C. Optimization of object-oriented programs using static class hierarchy analysis. In ECOOP 1995.
[12]
DOLBY, J., AND CHIEN, A. An automatic object inlining optimization and its evaluation. In PLDI 2000.
[13]
GROSSMAN, D., MANSON, J., AND PUGH, W. What do high-level memory models mean for transactions? In MSPC 2006.
[14]
HARRIS, T., AND FRASER, K. Language support for lightweight transactions. In OOPSLA 2003.
[15]
HARRIS, T., MARLOW, S., JONES, S. P., AND HERLIHY, M. Composable memory transactions. In PPoPP 2005.
[16]
HARRIS, T., PLESKO, M., SHINNAR, A., AND TARDITI, D. Optimizing memory transactions. In PLDI 2006.
[17]
HEINE, D. L., AND LAM, M. S. A practical flow-sensitive and context-sensitive C and C++ memory leak detector. In PLDI 2003.
[18]
HERLIHY, M., AND MOSS, J. E. B. Transactional memory: architectural support for lock-free data structures. In ISCA 1993.
[19]
HINDMAN, B., AND GROSSMAN, D. Atomicity via source-to-source translation. In MSPC 2006.
[20]
HINDMAN, B., AND GROSSMAN, D. Strong atomicity for Java without virtual-machine support. Tech. Rep. UW-CSE-06-05-01, May 2006.
[21]
INTEL CORPORATION. Intel 64 and IA-32 Architectures Software Developer's Manual Volume 3A: System Programming Guide.
[22]
ISHIZAKI, K., KAWAHITO, M., YASUE, T., KOMATSU, H., AND NAKATANI, T. A study of devirtualization techniques for a Java just-in-time compiler. In OOPSLA 2000.
[23]
KOTZMANN, T., AND MOSSENBOCK, H. Escape analysis in the context of dynamic compilation and deoptimization. In VEE 2005.
[24]
LHOTA K, O., AND HENDREN, L. Run-time evaluation of opportunities for object inlining in Java. In JGI '02: Proc. of the conf. on Java Grande.
[25]
MENON, V., BALENSIEFER, S., SHPEISMAN, T., ADLTABATABAI, A.-R., HUDSON, R. L., SAHA, B., AND WELC, A. Practical weak-atomicity semantics for Java STM. In SPAA 2008.
[26]
MOORE, K. F., AND GROSSMAN, D. High-level small-step operational semantics for transactions. In POPL 2008.
[27]
NAIK, M., AIKEN, A., AND WHALEY, J. Effective static race detection for Java. In PLDI 2006.
[28]
PECHTCHANSKI, I., AND SARKAR, V. Dynamic optimistic interprocedural analysis: a framework and an application. In OOPSLA 2001.
[29]
SAVAGE, S., BURROWS, M., NELSON, G., SOBALVARRO, P., AND ANDERSON, T. Eraser: a dynamic data race detector for multi-threaded programs. In SOSP 1997.
[30]
SHPEISMAN, T., MENON, V., ADL-TABATABAI, A.-R., BALENSIEFER, S., GROSSMAN, D., HUDSON, R. L., MOORE, K. F., AND SAHA, B. Enforcing isolation and ordering in STM. In PLDI 2007.
[31]
STANDARD PERFORMANCE EVALUATION CORPORATION. SPEC JVM98, 1998. See http://www.spec.org/jvm98.
[32]
STANDARD PERFORMANCE EVALUATION CORPORATION. SPEC JBB2000, 2000. See http://www.spec.org/jbb2000.
[33]
VITEK, J., AND BOKOWSKI, B. Confined types. In OOPSLA 1999.
[34]
VIVIEN, F., AND RINARD, M. Incrementalized pointer and escape analysis. In PLDI 2001 (2001).
[35]
VON PRAUN, C., AND GROSS, T. R. Object race detection. In OOPSLA 2001.
[36]
VON PRAUN, C., AND GROSS, T. R. Static conflict analysis for multi-threaded object--oriented programs. In PLDI 2003.
[37]
WIMMER, C., AND MOSSENBOCK, H. Automatic feedback directed object inlining in the Java Hotspot virtual machine. In VEE 2007.

Cited By

View all
  • (2023)AtomiS: Data-Centric Synchronization Made PracticalProceedings of the ACM on Programming Languages10.1145/36228017:OOPSLA2(116-145)Online publication date: 16-Oct-2023
  • (2016)From atomic variables to data-centric concurrency controlProceedings of the 31st Annual ACM Symposium on Applied Computing10.1145/2851613.2851734(1806-1811)Online publication date: 4-Apr-2016
  • (2015)Low-overhead software transactional memory with progress guarantees and strong semanticsACM SIGPLAN Notices10.1145/2858788.268851050:8(97-108)Online publication date: 24-Jan-2015
  • Show More Cited By

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM Conferences
OOPSLA '08: Proceedings of the 23rd ACM SIGPLAN conference on Object-oriented programming systems languages and applications
October 2008
654 pages
ISBN:9781605582153
DOI:10.1145/1449764
  • cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 43, Issue 10
    September 2008
    613 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/1449955
    Issue’s Table of Contents
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]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 19 October 2008

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. code generation
  2. compiler optimizations
  3. dynamic optimizations
  4. strong atomicity
  5. transactional memory
  6. virtual machines

Qualifiers

  • Research-article

Conference

OOPSLA08
Sponsor:

Acceptance Rates

Overall Acceptance Rate 268 of 1,244 submissions, 22%

Upcoming Conference

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)2
  • Downloads (Last 6 weeks)0
Reflects downloads up to 17 Dec 2024

Other Metrics

Citations

Cited By

View all
  • (2023)AtomiS: Data-Centric Synchronization Made PracticalProceedings of the ACM on Programming Languages10.1145/36228017:OOPSLA2(116-145)Online publication date: 16-Oct-2023
  • (2016)From atomic variables to data-centric concurrency controlProceedings of the 31st Annual ACM Symposium on Applied Computing10.1145/2851613.2851734(1806-1811)Online publication date: 4-Apr-2016
  • (2015)Low-overhead software transactional memory with progress guarantees and strong semanticsACM SIGPLAN Notices10.1145/2858788.268851050:8(97-108)Online publication date: 24-Jan-2015
  • (2015)Low-overhead software transactional memory with progress guarantees and strong semanticsProceedings of the 20th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming10.1145/2688500.2688510(97-108)Online publication date: 24-Jan-2015
  • (2014)T-RexProceedings of the Ninth European Conference on Computer Systems10.1145/2592798.2592809(1-12)Online publication date: 14-Apr-2014
  • (2012)Moverness for Locks and TransactionsProceedings of the 2012 Sixth International Symposium on Theoretical Aspects of Software Engineering10.1109/TASE.2012.29(185-192)Online publication date: 4-Jul-2012
  • (2011)Enhanced speculative parallelization via incremental recoveryACM SIGPLAN Notices10.1145/2038037.194158046:8(189-200)Online publication date: 12-Feb-2011
  • (2011)Enhanced speculative parallelization via incremental recoveryProceedings of the 16th ACM symposium on Principles and practice of parallel programming10.1145/1941553.1941580(189-200)Online publication date: 12-Feb-2011
  • (2011)Safe nondeterminism in a deterministic-by-default parallel languageProceedings of the 38th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages10.1145/1926385.1926447(535-548)Online publication date: 26-Jan-2011
  • (2011)Safe nondeterminism in a deterministic-by-default parallel languageACM SIGPLAN Notices10.1145/1925844.192644746:1(535-548)Online publication date: 26-Jan-2011
  • Show More Cited By

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media