Memory management for multi-application managed runtime environments

Modern computing platforms are pervasive, networked, heterogeneous and increasingly complex. These systems range from small hand-held devices such as cell phones, to large servers that run back-end software. Portability, widespread use, and security of program execution as well as support for a fast program development cycle are key concerns of software developers and end users of these platforms. To address these concerns, modern programming languages and their implementations have emerged to facilitate high-level, object-oriented, and type-safe software development that is portable and secure. Popular examples of these languages are Java and the .NET languages. Programs written in these languages are encoded by a source compiler into an architecture-independent format, and then executed on any platform for which there is a virtual execution environment called a Managed Runtime Environment (MRE). MREs provide dynamic compilation of programs to the underlying native machine format, adaptive optimization, memory management, security verification, and other runtime services for programs. Automatic memory management, or Garbage Collection (GC), is an MRE service that is key to facilitating programmer productivity, portability, and memory safety of programs written in Java and the .NET languages. GC relieves the user from employing (and debugging) explicit deallocation of heap memory. However, since such management and reclamation is provided by the MRE, it necessarily introduces overhead. Much prior work has focused on mitigating the overhead of GC for MREs that execute a single program at a time using a single operating system process. However, today's MRE platforms execute a wide variety of applications with diverse computational characteristics, resource requirements and object lifetimes. Moreover, state-of-the-art MREs now are able to execute multiple applications using a single MRE process, serially or concurrently. For widespread use of such systems, and arguably for the success of such languages, we must advance GC technology to exploit the multi-program execution model and to enable efficient automatic memory management and program performance for the next-generation of portable software. In this dissertation, we focus on memory management techniques for the next-generation of multi-program MREs for Java and consider both serial (persistent) and concurrent program execution models. In particular, we investigate, design, and engineer two novel solutions for GC that facilitate high-performance program execution for these MREs: (i) Application-Specific Garbage Collection and (ii) Scalable Memory Management for Multi-Tasking MREs. In the former, we customize and automatically specialize the GC in an MRE for a particular application and switch GCs automatically within a single, persistent MRE as needed for each new application that the MRE executes. In the latter, we present a novel GC system for concurrent execution of programs; this system isolates GC activities of individual tasks while programs share a single heap. Our results show that we are able to achieve significant performance gains over the state-of-the-art MRE systems for both research and production-quality multi-program MRE systems in terms of throughput, response time, and memory footprint.

[1]  Urs Hölzle,et al.  A Fast Write Barrier for Generational Garbage Collectors , 1993 .

[2]  Chandra Krintz Coupling on-line and off-line profile information to improve program performance , 2003, International Symposium on Code Generation and Optimization, 2003. CGO 2003..

[3]  Kathryn S. McKinley,et al.  Ulterior reference counting: fast garbage collection without a long wait , 2003, OOPSLA '03.

[4]  Bjarne Steensgaard,et al.  Thread-specific heaps for multi-threaded programs , 2000, ISMM '00.

[5]  David Gay,et al.  Memory management with explicit regions , 1998, PLDI.

[6]  Kathryn S. McKinley,et al.  In or out?: putting write barriers in their place , 2002, ISMM '02.

[7]  Andrew Kennedy,et al.  Combining Generics, Pre-compilation and Sharing Between Software-Based Processes , 2004 .

[8]  Tony Printezis,et al.  Hot-Swapping Between a Mark&Sweep and a Mark&Compact Garbage Collector in a Generational Environment , 2001, Java Virtual Machine Research and Technology Symposium.

[9]  Erez Petrank,et al.  Thread-local heaps for Java , 2002, ISMM '02.

[10]  Darko Stefanovic,et al.  A comparative performance evaluation of write barrier implementation , 1992, OOPSLA '92.

[11]  Cliff Click,et al.  The java hotspot TM server compiler , 2001 .

[12]  Kathryn S. McKinley,et al.  Age-based garbage collection , 1999, OOPSLA '99.

[13]  Chandra Krintz,et al.  Task-aware garbage collection in a multi-tasking virtual machine , 2006, ISMM '06.

[14]  Emery D. Berger,et al.  MC2: high-performance garbage collection for memory-constrained environments , 2004, OOPSLA.

[15]  Benjamin G. Zorn,et al.  Comparing mark-and sweep and stop-and-copy garbage collection , 1990, LISP and Functional Programming.

[16]  Toshiaki Yasue,et al.  A region-based compilation technique for a Java just-in-time compiler , 2003, PLDI '03.

[17]  Matthias Jacob,et al.  Concurrent Remembered Set Refinement in Generational Garbage Collection , 2002, Java Virtual Machine Research and Technology Symposium.

[18]  Andrew W. Appel,et al.  Simple generational garbage collection and fast allocation , 1989, Softw. Pract. Exp..

[19]  Laurent Daynès,et al.  Sharing the Runtime Representation of Classes Across Class Loaders , 2005, ECOOP.

[20]  Robert P. Fitzgerald,et al.  The case for profile-directed selection of garbage collectors , 2000, ISMM '00.

[21]  Patrick M. Sansom Combining Single-Space and Two-Space Compacting Garbage Collectors , 1991, Functional Programming.

[22]  David F. Bacon,et al.  Space- and Time-Efficient Implementation of the Java Object Model , 2002, ECOOP.

[23]  Antony L. Hosking,et al.  Reducing generational copy reserve overhead with fallback compaction , 2006, ISMM '06.

[24]  Urs Hölzle,et al.  A third-generation SELF implementation: reconciling responsiveness with performance , 1994, OOPSLA '94.

[25]  Grzegorz Czajkowski Application isolation in the JavaTM Virtual Machine , 2000, OOPSLA.

[26]  Paul R. Wilson,et al.  Dynamic Storage Allocation: A Survey and Critical Review , 1995, IWMM.

[27]  Craig Chambers,et al.  Making pure object-oriented languages practical , 1991, OOPSLA '91.

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

[29]  Erez Petrank,et al.  The Compressor: concurrent, incremental, and parallel compaction , 2006, PLDI '06.

[30]  Stephen J. Fink,et al.  Design, implementation and evaluation of adaptive recompilation with on-stack replacement , 2003, International Symposium on Code Generation and Optimization, 2003. CGO 2003..

[31]  David Detlefs,et al.  Garbage-first garbage collection , 2004, ISMM '04.

[32]  Stephen J. Fink,et al.  The Jalapeño virtual machine , 2000, IBM Syst. J..

[33]  Matthew Arnold,et al.  Adaptive optimization in the Jalapeño JVM , 2000, OOPSLA '00.

[34]  Erez Petrank,et al.  Combining card marking with remembered sets: how to save scanning time , 1998, ISMM '98.

[35]  Chandra Krintz,et al.  Profile-driven code unloading for resource-constrained JVMs , 2004, PPPJ.

[36]  Frank Yellin,et al.  The Java Virtual Machine Specification , 1996 .

[37]  J. Eliot B. Moss,et al.  Mark-copy: fast copying GC with less space overhead , 2003, OOPSLA '03.

[38]  Henry Lieberman,et al.  A real-time garbage collector based on the lifetimes of objects , 1983, CACM.

[39]  Kathryn S. McKinley,et al.  Beltway: getting around garbage collection gridlock , 2002, PLDI '02.

[40]  David S. Munro,et al.  Garbage collecting the world: one car at a time , 1997, OOPSLA '97.

[41]  Martín Abadi,et al.  An Overview of the Singularity Project , 2005 .

[42]  Urs Hölzle,et al.  Optimizing dynamically-dispatched calls with run-time type feedback , 1994, PLDI '94.

[43]  J. Gregory Morrisett,et al.  Comparing mostly-copying and mark-sweep conservative collection , 1998, ISMM '98.

[44]  Thorsten von Eicken,et al.  Luna: a flexible Java protection system , 2002, OPSR.

[45]  Rajiv Arora,et al.  Java server performance: A case study of building efficient, scalable Jvms , 2000, IBM Syst. J..

[46]  Craig Chambers,et al.  Debugging optimized code with dynamic deoptimization , 1992, PLDI '92.

[47]  John McCarthy,et al.  Recursive functions of symbolic expressions and their computation by machine, Part I , 1960, Commun. ACM.

[48]  Paul R. Wilson,et al.  Non-compacting memory allocation and real-time garbage collection , 1997 .

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

[50]  Paul R. Wilson,et al.  A “card-marking” scheme for controlling intergenerational references in generation-based garbage collection on stock hardware , 1989, SIGP.

[51]  Wilson C. Hsieh,et al.  The KaffeOS Java runtime system , 2005, TOPL.

[52]  Vivek Sarkar,et al.  The Jalape ~ no Dynamic Optimizing Compiler for Java TM , 1999 .

[53]  Amer Diwan,et al.  Compiler support for garbage collection in a statically typed language , 1992, PLDI '92.

[54]  Paul R. Wilson,et al.  Uniprocessor Garbage Collection Techniques , 1992, IWMM.

[55]  Chris J. Cheney A nonrecursive list compacting algorithm , 1970, Commun. ACM.

[56]  James M. Stichnoth,et al.  Practicing JUDO: Java under dynamic optimizations , 2000, PLDI '00.

[57]  Tim Brecht,et al.  Controlling garbage collection and heap growth to reduce the execution time of Java applications , 2006, TOPL.

[58]  Henk-Evert Sonder,et al.  Common Language Runtime , 2001 .

[59]  Rafael Dueire Lins,et al.  Garbage collection: algorithms for automatic dynamic memory management , 1996 .

[60]  Antony L. Hosking,et al.  Remembered sets can also play cards , 1999 .

[61]  David M. Ungar,et al.  Generation Scavenging: A non-disruptive high performance storage reclamation algorithm , 1984, SDE 1.