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.
- ABADI, M., BIRRELL, A., HARRIS, T., AND ISARD, M. Semantics of transactional memory and automatic mutual exclusion. In POPL 2008. Google Scholar
Digital Library
- 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. Google Scholar
Digital Library
- BLUNDELL, C., LEWIS, E. C., AND MARTIN, M. Subtleties of transactional memory atomicity semantics. Computer Architecture Letters 5, 2 (Nov. 2006). Google Scholar
Digital Library
- 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. Google Scholar
Digital Library
- BOYAPATI, C., LEE, R., AND RINARD, M. Ownership types for safe programming: preventing data races and deadlocks. In OOPSLA 2002. Google Scholar
Digital Library
- 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). Google Scholar
Digital Library
- 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). Google Scholar
Digital Library
- 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. Google Scholar
Digital Library
- CLARKE, D., RICHMOND, M., AND NOBLE, J. Saving the world from bad beans: deployment-time confinement checking. In OOPSLA 2003. Google Scholar
Digital Library
- CLARKE, D. G., POTTER, J. M., AND NOBLE, J. Ownership types for flexible alias protection. In OOPSLA 1998. Google Scholar
Digital Library
- DEAN, J., GROVE, D., AND CHAMBERS, C. Optimization of object-oriented programs using static class hierarchy analysis. In ECOOP 1995. Google Scholar
Digital Library
- DOLBY, J., AND CHIEN, A. An automatic object inlining optimization and its evaluation. In PLDI 2000. Google Scholar
Digital Library
- GROSSMAN, D., MANSON, J., AND PUGH, W. What do high-level memory models mean for transactions? In MSPC 2006. Google Scholar
Digital Library
- HARRIS, T., AND FRASER, K. Language support for lightweight transactions. In OOPSLA 2003. Google Scholar
Digital Library
- HARRIS, T., MARLOW, S., JONES, S. P., AND HERLIHY, M. Composable memory transactions. In PPoPP 2005. Google Scholar
Digital Library
- HARRIS, T., PLESKO, M., SHINNAR, A., AND TARDITI, D. Optimizing memory transactions. In PLDI 2006. Google Scholar
Digital Library
- HEINE, D. L., AND LAM, M. S. A practical flow-sensitive and context-sensitive C and C++ memory leak detector. In PLDI 2003. Google Scholar
Digital Library
- HERLIHY, M., AND MOSS, J. E. B. Transactional memory: architectural support for lock-free data structures. In ISCA 1993. Google Scholar
Digital Library
- HINDMAN, B., AND GROSSMAN, D. Atomicity via source-to-source translation. In MSPC 2006. Google Scholar
Digital Library
- HINDMAN, B., AND GROSSMAN, D. Strong atomicity for Java without virtual-machine support. Tech. Rep. UW-CSE-06-05-01, May 2006.Google Scholar
- INTEL CORPORATION. Intel 64 and IA-32 Architectures Software Developer's Manual Volume 3A: System Programming Guide.Google Scholar
- 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. Google Scholar
Digital Library
- KOTZMANN, T., AND MOSSENBOCK, H. Escape analysis in the context of dynamic compilation and deoptimization. In VEE 2005. Google Scholar
Digital Library
- 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. Google Scholar
Digital Library
- 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. Google Scholar
Digital Library
- MOORE, K. F., AND GROSSMAN, D. High-level small-step operational semantics for transactions. In POPL 2008. Google Scholar
Digital Library
- NAIK, M., AIKEN, A., AND WHALEY, J. Effective static race detection for Java. In PLDI 2006. Google Scholar
Digital Library
- PECHTCHANSKI, I., AND SARKAR, V. Dynamic optimistic interprocedural analysis: a framework and an application. In OOPSLA 2001. Google Scholar
Digital Library
- SAVAGE, S., BURROWS, M., NELSON, G., SOBALVARRO, P., AND ANDERSON, T. Eraser: a dynamic data race detector for multi-threaded programs. In SOSP 1997. Google Scholar
Digital Library
- 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. Google Scholar
Digital Library
- STANDARD PERFORMANCE EVALUATION CORPORATION. SPEC JVM98, 1998. See http://www.spec.org/jvm98.Google Scholar
- STANDARD PERFORMANCE EVALUATION CORPORATION. SPEC JBB2000, 2000. See http://www.spec.org/jbb2000.Google Scholar
- VITEK, J., AND BOKOWSKI, B. Confined types. In OOPSLA 1999. Google Scholar
Digital Library
- VIVIEN, F., AND RINARD, M. Incrementalized pointer and escape analysis. In PLDI 2001 (2001). Google Scholar
Digital Library
- VON PRAUN, C., AND GROSS, T. R. Object race detection. In OOPSLA 2001. Google Scholar
Digital Library
- VON PRAUN, C., AND GROSS, T. R. Static conflict analysis for multi-threaded object--oriented programs. In PLDI 2003. Google Scholar
Digital Library
- WIMMER, C., AND MOSSENBOCK, H. Automatic feedback directed object inlining in the Java Hotspot virtual machine. In VEE 2007. Google Scholar
Digital Library
Index Terms
Dynamic optimization for efficient strong atomicity
Recommendations
Dynamic optimization for efficient strong atomicity
OOPSLA '08: Proceedings of the 23rd ACM SIGPLAN conference on Object-oriented programming systems languages and applicationsTransactional 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 ...
Enforcing isolation and ordering in STM
Proceedings of the 2007 PLDI conferenceTransactional memory provides a new concurrency control mechanism that avoids many of the pitfalls of lock-based synchronization. High-performance software transactional memory (STM) implementations thus far provide weak atomicity: Accessing shared data ...
Enforcing isolation and ordering in STM
PLDI '07: Proceedings of the 28th ACM SIGPLAN Conference on Programming Language Design and ImplementationTransactional memory provides a new concurrency control mechanism that avoids many of the pitfalls of lock-based synchronization. High-performance software transactional memory (STM) implementations thus far provide weak atomicity: Accessing shared data ...







Comments