Abstract
The Java™ programming language contains built-in synchronization primitives for use in constructing multithreaded programs. Efficient implementation of these synchronization primitives is necessary in order to achieve high performance.Recent research [9, 12, 10, 3, 7] has focused on the run-time elimination of the atomic operations required to implement object monitor synchronization primitives. This paper describes a novel technique called store-free biased locking which eliminates all synchronization-related atomic operations on uncontended object monitors. The technique supports the bulk transfer of object ownership from one thread to another, and the selective disabling of the optimization where unprofitable, using epoch-based bulk rebiasing and revocation. It has been implemented in the production version of the Java HotSpot™VM and has yielded significant performance improvements on a range of benchmarks and applications. The technique is applicable to any virtual machine-based programming language implementation with mostly block-structured locking primitives.
- Agesen, O., Detlefs, D., Garthwaite, A., Knippel, R., Ramakrishna, Y. S., and White, D. An efficient meta-lock for ubiquitous synchronization. In proceedings of OOPSLA '99, November 1999, pp. 207--222.]] Google Scholar
Digital Library
- Bacon, D. F., Konuru, R., Murthy, C., and Serrano, M. Thin locks: featherweight synchronization for Java. In proceedings of PLDI '98, June 1998, pp. 258--268.]] Google Scholar
Digital Library
- Bacon, D. F. and Fink, S. Method and apparatus to provide concurrency control over objects without atomic operations on non-shared objects. U.S. Patent Number 6,772,153, issued August 3, 2004. Assignee: International Business Machines Corporation.]]Google Scholar
- Bak, L. and Lindholm, T. G. Method and apparatus for concurrent thread synchronization. U.S. Patent Number 6,167,424, issued December 26, 2000. Assignee: Sun Microsystems, Inc.]]Google Scholar
- Dice, D. Implementing fast Java monitors with relaxed locks. In proceedings of the Java Virtual Machine Research and Technology Symposium (JVM '01), April 2001, pp. 79--90.]] Google Scholar
Digital Library
- Dice, D. Personal communication.]]Google Scholar
- Gomes, B. A., Bak, L., and Stoutamire, D. P. Method and apparatus for speculatively locking objects in an object-based system. U.S. Patent Number 6,487,652, issued November 26, 2002. Assignee: Sun Microsystems, Inc.]]Google Scholar
- Griesemer, R. and Mitrovic, S. A compiler for the Java HotSpot™virtual machine. The School of Niklaus Wirth, "The Art of Simplicity", January 2000, p.133--152.]] Google Scholar
Digital Library
- Kawachiya, K., Koseki, A., and Onodera, T. Lock reservation: Java locks can mostly do without atomic operations. In proceedings of OOPSLA '02, November 2002, pp. 130--141.]] Google Scholar
Digital Library
- Kawachiya, K. Ph.D thesis, Graduate School of Media and Governance at Keio University, 2005.]]Google Scholar
- Lindholm, T. and Yellin, F. The Java™Virtual Machine Specification, Second Edition. Addison-Wesley, 1999.]] Google Scholar
Digital Library
- Onodera, T., Kawachiya, K., and Koseki, K. Lock reservation for Java reconsidered. In proceedings of ECOOP '04, June 2004, pp. 559--583.]]Google Scholar
Cross Ref
- Paleczny, M., Vick, C., and Click, C. The Java HotSpot™server compiler. In proceedings of the Java Virtual Machine Research and Technology Symposium (JVM '01), April 2001.]] Google Scholar
Digital Library
- Salcianu, A., and Rinard, M. Pointer and escape analysis for multithreaded programs. Proceedings of the Eighth ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, Snowbird, Utah, June 2001.]] Google Scholar
Digital Library
- Schmidt, R. W. System and method for facilitating safepoint synchronization in a multithreaded computer system. U.S. Patent Number 6,523,059, issued February 18, 2003. Assignee: Sun Microsystems, Inc.]]Google Scholar
- Stoodley, M. Accelerating Java synchronization in Just-In-Time compiler-generated code. 3rd Workshop on Compiler-Driven Performance, October 2004. linebreak http://www.cs.ualberta.ca/~amaral/cascon/CDP04/]]Google Scholar
- Woo, S.C., Ohara, M., Torrie, E., Singh, J.P., and Gupta, A. The SPLASH-2 programs: characterization and methodological considerations. In Proceedings of the 22nd International Symposium on Computer Architecture, pages 24--36, Santa Margherita Ligure, Italy, June 1995.]] Google Scholar
Digital Library
Index Terms
Eliminating synchronization-related atomic operations with biased locking and bulk rebiasing
Recommendations
Eliminating synchronization-related atomic operations with biased locking and bulk rebiasing
OOPSLA '06: Proceedings of the 21st annual ACM SIGPLAN conference on Object-oriented programming systems, languages, and applicationsThe Java™ programming language contains built-in synchronization primitives for use in constructing multithreaded programs. Efficient implementation of these synchronization primitives is necessary in order to achieve high performance.Recent research [9,...
Lock reservation: Java locks can mostly do without atomic operations
Because of the built-in support for multi-threaded programming, Java programs perform many lock operations. Although the overhead has been significantly reduced in the recent virtual machines, One or more atomic operations are required for acquiring and ...
Lock reservation: Java locks can mostly do without atomic operations
OOPSLA '02: Proceedings of the 17th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applicationsBecause of the built-in support for multi-threaded programming, Java programs perform many lock operations. Although the overhead has been significantly reduced in the recent virtual machines, One or more atomic operations are required for acquiring and ...







Comments