Comprehensive synchronization elimination for Java

In this paper, we describe three novel analyses for eliminating unnecessary synchronization that remove over 70% of dynamic synchronization operations on the majority of our 15 benchmarks and improve the bottom-line performance of three by 37-53%. Our whole-program analyses attack three frequent forms of unnecessary synchronization: thread-local synchronization, reentrant synchronization, and enclosed lock synchronization. We motivate the design of our analyses with a study of the kinds of unnecessary synchronization found in a suite of single- and multithreaded benchmarks of different sizes and drawn from a variety of domains. We analyze the performance of our optimizations in terms of dynamic operations removed and run-time speedup. We also show that our analyses may enable the use of simpler synchronization models than the model found in Java, at little or no additional cost in execution time. The synchronization optimizations, we describe enable programmers to design efficient, reusable and maintainable libraries and systems in Java without cumbersome manual code restructuring.

[1]  James C. Corbett,et al.  Using shape analysis to reduce finite-state models of concurrent Java programs , 2000, TSEM.

[2]  William Pugh Fixing the Java memory model , 1999, JAVA '99.

[3]  Bruno Blanchet,et al.  Escape analysis for object-oriented languages: application to Java , 1999, OOPSLA '99.

[4]  Erik Ruf,et al.  Effective synchronization removal for Java , 2000, PLDI '00.

[5]  Olin Shivers,et al.  Control flow analysis in scheme , 1988, PLDI '88.

[6]  Emin Gün Sirer,et al.  Design and implementation of a distributed virtual machine for networked computers , 2000, OPSR.

[7]  Martin C. Rinard,et al.  Lock Coarsening: Eliminating Lock Overhead in Automatically Parallelized Object-Based Programs , 1996, LCPC.

[8]  David A. McAllester On the complexity analysis of static analyses , 1999, JACM.

[9]  Martin C. Rinard,et al.  Pointer analysis for multithreaded programs , 1999, PLDI '99.

[10]  David A. McAllester On the complexity analysis of static analyses , 2002, JACM.

[11]  K. Rustan M. Leino,et al.  Extended static checking , 1998, PROCOMET.

[12]  David Grove,et al.  Vortex: an optimizing compiler for object-oriented languages , 1996, OOPSLA '96.

[13]  Andreas Krall,et al.  Monitors and exceptions: how to implement Java efficiently , 1998 .

[14]  James C. Corbett,et al.  Constructing compact models of concurrent Java programs , 1998, ISSTA '98.

[15]  Andrew A. Chien,et al.  Obtaining sequential efficiency for concurrent object-oriented languages , 1995, POPL '95.

[16]  Erik Ruf,et al.  Marmot: an optimizing compiler for Java , 2000 .

[17]  Martin C. Rinard,et al.  Compositional pointer and escape analysis for Java programs , 1999, OOPSLA '99.

[18]  Andrew A. Chien,et al.  Optimization of object-oriented and concurrent programs , 1996 .

[19]  Martin C. Rinard,et al.  Lock Coarsening: Eliminating Lock Overhead in Automatically Parallelized Object-Based Programs , 1998, J. Parallel Distributed Comput..

[20]  Kiyokuni Kawachiya,et al.  A study of locking objects with bimodal fields , 1999, OOPSLA '99.

[21]  George S. Avrunin,et al.  An efficient algorithm for computing MHP information for concurrent Java programs , 1999, ESEC/FSE-7.

[22]  Mauricio J. Serrano,et al.  Thin locks: featherweight synchronization for Java , 1998, PLDI '98.

[23]  Urs Hölzle,et al.  Removing unnecessary synchronization in Java , 1999, OOPSLA '99.

[24]  Marc Najork,et al.  Performance limitations of the Java core libraries , 1999, JAVA '99.

[25]  Susan J. Eggers,et al.  Static Analysis of Barrier Synchronization in Explicitly Parallel Programs , 1994, IFIP PACT.

[26]  Emin Gün Sirer,et al.  Static Analyses for Eliminating Unnecessary Synchronization from Java Programs , 1999, SAS.

[27]  Butler W. Lampson,et al.  Experience with processes and monitors in Mesa , 1980, CACM.

[28]  Jong-Deok Choi,et al.  TECHNOLOGY ADMINISTRATION , 2004 .

[29]  Y. S. Ramakrishna,et al.  An efficient meta-lock for implementing ubiquitous synchronization , 1999, OOPSLA '99.

[30]  David Grove,et al.  Call graph construction in object-oriented languages , 1997, OOPSLA '97.

[31]  Guy L. Steele,et al.  The Java Language Specification , 1996 .

[32]  Sandeep K. Singhal,et al.  Building high-performance applications and services in Java: an experiential study , 1997, OOPSLA '97.

[33]  Samuel P. Harbison,et al.  Modula-3 , 1992 .