skip to main content
article

Eliminating synchronization-related atomic operations with biased locking and bulk rebiasing

Published:16 October 2006Publication History
Skip Abstract Section

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.

References

  1. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  2. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  3. 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 ScholarGoogle Scholar
  4. 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 ScholarGoogle Scholar
  5. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  6. Dice, D. Personal communication.]]Google ScholarGoogle Scholar
  7. 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 ScholarGoogle Scholar
  8. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  9. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  10. Kawachiya, K. Ph.D thesis, Graduate School of Media and Governance at Keio University, 2005.]]Google ScholarGoogle Scholar
  11. Lindholm, T. and Yellin, F. The Java™Virtual Machine Specification, Second Edition. Addison-Wesley, 1999.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Onodera, T., Kawachiya, K., and Koseki, K. Lock reservation for Java reconsidered. In proceedings of ECOOP '04, June 2004, pp. 559--583.]]Google ScholarGoogle ScholarCross RefCross Ref
  13. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  14. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  15. 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 ScholarGoogle Scholar
  16. 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 ScholarGoogle Scholar
  17. 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 ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Eliminating synchronization-related atomic operations with biased locking and bulk rebiasing

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in

    Full Access

    • Published in

      cover image ACM SIGPLAN Notices
      ACM SIGPLAN Notices  Volume 41, Issue 10
      Proceedings of the 2006 OOPSLA Conference
      October 2006
      480 pages
      ISSN:0362-1340
      EISSN:1558-1160
      DOI:10.1145/1167515
      Issue’s Table of Contents
      • cover image ACM Conferences
        OOPSLA '06: Proceedings of the 21st annual ACM SIGPLAN conference on Object-oriented programming systems, languages, and applications
        October 2006
        514 pages
        ISBN:1595933484
        DOI:10.1145/1167473

      Copyright © 2006 ACM

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 16 October 2006

      Check for updates

      Qualifiers

      • article

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader
    About Cookies On This Site

    We use cookies to ensure that we give you the best experience on our website.

    Learn more

    Got it!