Sharing the Runtime Representation of Classes Across Class Loaders

One of the most distinctive features of the JavaTM programming language is the ability to specify class loading policies. Despite the popularity of class loaders, little has been done to reduce the cost associated with defining the same class by multiple loaders. In particular, implementations of the Java virtual machine (JVMTM) create a complete runtime representation of each class regardless of how many class loaders already define the same class. This lack of sharing leads to poor memory utilization and to replicated run-time work. Recent efforts achieve some degree of sharing only when dynamic binding behaves predictably across loaders. This limits sharing to class loaders whose behavior is fully controlled by the JVM. As a result applications that implement their own class loading policies cannot enjoy the benefit of sharing. We present a novel technique for sharing the runtime representation of classes (including bytecodes and, under some conditions, compiled code) across arbitrary user-defined class loaders. We describe how our approach is applied to the multi-tasking virtual machine (MVM). The new multi-tasking virtual machine retains the fast start-up time of the original MVM while extending the scope of footprint savings to applications that exploit user-defined class loaders.

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

[2]  Sheng Liang,et al.  Dynamic class loading in the Java virtual machine , 1998, OOPSLA '98.

[3]  L. Gong,et al.  Experience with secure multi-processing in Java , 1998, Proceedings. 18th International Conference on Distributed Computing Systems (Cat. No.98CB36183).

[4]  Rajesh Bordawekar,et al.  Building a Java virtual machine for server applications: The Jvm on OS/390 , 2000, IBM Syst. J..

[5]  Samuel P. Midkiff,et al.  Quicksilver: a quasi-static compiler for Java , 2000, OOPSLA '00.

[6]  Guy L. Steele,et al.  Java Language Specification, Second Edition: The Java Series , 2000 .

[7]  S. Dufour I: Commerce , 2001, Canadian Yearbook of international Law/Annuaire canadien de droit international.

[8]  Samuel P. Midkiff,et al.  A framework for efficient reuse of binary code in Java , 2001, ICS '01.

[9]  Zhong Shao,et al.  Supporting Binary Compatibility with Static Compilation , 2002, Java Virtual Machine Research and Technology Symposium.

[10]  Nathaniel Nystrom,et al.  Code Sharing among Virtual Machines , 2002, ECOOP.

[11]  Laurent Daynès,et al.  Dynamically loaded classes as shared libraries: an approach to improving virtual machine scalability , 2003, Proceedings International Parallel and Distributed Processing Symposium.

[12]  Laurent Daynès,et al.  A Multi-User Virtual Machine , 2003, USENIX Annual Technical Conference, General Track.

[13]  Guy L. Steele,et al.  Java(TM) Language Specification, The (3rd Edition) (Java (Addison-Wesley)) , 2005 .