Multi-tasking Virtual Machine Class Sharing

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Managed runtime environments (MREs) face inefficiencies in memory usage and startup performance due to a lack of class representation sharing across programs, leading to duplication of effort and memory waste during runtime transformations.

Innovation Solution

A multi-tasking virtual machine configures shared runtime representations of classes for programs with identical classpaths, splitting each class into shared and private representations, allowing safe sharing among tasks with identical classpaths, and maintaining a system dictionary to manage these shared representations.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If runtime transformations are performed for each program independently, then program portability and mobility are enhanced, but memory usage increases and startup performance deteriorates due to duplication of transformation effort

Engineering Contradiction:
Improveprogram portabilityVSAvoidmemory usage
Core Design Contradiction:
Adaptability or versatilityVSQuantity of substance

Solution Approach 1:

The patent merges the runtime transformations of classes across multiple programs by introducing a shared runtime representation mechanism. When two or more programs specify identical classpaths, their class transformations are combined into a single shared runtime representation, eliminating redundant transformation efforts and reducing memory usage while preserving portability.

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

The shared runtime representation serves multiple programs simultaneously, making the transformation system universal. A single transformed class representation can be reused across different programs that share the same classpath, allowing the same transformation infrastructure to serve multiple functions and reduce overall resource consumption.

Inventive Principle:
Principle #6Universality (Multi-functionality)

2Adaptability or versatility

If runtime transformations are performed for each program independently, then program portability is maintained, but startup performance worsens due to duplication of transformation effort

Engineering Contradiction:
Improveprogram portabilityVSAvoidstartup performance
Core Design Contradiction:
Adaptability or versatilityVSLoss of time

Solution Approach 1:

The system performs preliminary transformation of classes into a shared runtime representation when the first program loads them. Subsequent programs that specify identical classpaths can then reuse this pre-transformed representation, eliminating the need to reperform the transformation effort during their startup, thus improving startup performance while maintaining portability.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

By merging the transformation efforts of multiple programs into a single shared runtime representation, the system eliminates redundant transformation operations that would otherwise occur during each program's startup, directly improving startup performance without sacrificing the ability to load and transform classes as needed.

Inventive Principle:
Principle #5Merging (Combining)

3Quantity of substance

If class runtime representations are shared across programs, then memory usage and startup performance improve, but program-specific configurations and classpaths cannot be maintained

Engineering Contradiction:
Improvememory usageVSAvoidprogram-specific configurations
Core Design Contradiction:
Quantity of substanceVSAdaptability or versatility

Solution Approach 1:

The system applies local quality by allowing programs to have different classpaths and configurations where needed, while sharing common runtime representations where classpaths are identical. The shared runtime representation maintains the specific classpath configuration of the program that first loaded the class, allowing different programs to coexist with their own configurations while reusing transformation results.

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

The system segments the class loading and transformation process into distinct phases: classpath specification (program-specific) and runtime transformation (shared). This segmentation allows program-specific classpaths to be maintained independently while enabling shared transformation of classes, resolving the contradiction between customization and resource efficiency.

Inventive Principle:
Principle #1Segmentation

4Quantity of substance

If a single shared runtime representation is used for all programs, then resource efficiency maximizes, but flexibility and program independence are lost

Engineering Contradiction:
Improveresource efficiencyVSAvoidprogram independence
Core Design Contradiction:
Quantity of substanceVSAdaptability or versatility

Solution Approach 1:

The system dynamically determines whether to share runtime representations based on the classpath specifications of individual programs. When programs specify identical classpaths, sharing is enabled for maximum efficiency. When classpaths differ, the system dynamically creates separate representations to maintain program independence. This dynamic behavior balances resource efficiency with program independence.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The shared runtime representation mechanism is universal in that it can serve any number of programs that share identical classpaths, maximizing resource efficiency for common cases. However, it gracefully degrades to program-specific representations when needed, maintaining flexibility and program independence without sacrificing the opportunity for efficient sharing where applicable.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Data Source

PatentUS8250559B2Supporting per-program classpaths with class sharing in a multi-tasking virtual machine
Publication Date: 2012.08.21 ORACLE AMERICAN INC
  • US8250559B2 patent drawing
  • US8250559B2 patent drawing
  • US8250559B2 patent drawing

AI summary

System and method for supporting per-program classpath and class sharing in a multi-tasking virtual machine. A virtual machine may allow each program to specify its classpath independently of other programs classpaths. Tasks that specify identical classpaths for their respective class loaders may share the runtime representation of classes. A multi-tasking virtual machine may generate and compare canonical forms of classpaths to determine which programs may share classes with each other. The runtime representation of a class may be split between shared and private portions of the runtime representation. A shared runtime representation may be associated with multiple private runtime representations. In one embodiment, unique class loader keys and a system dictionary may be used to associate tasks, class loaders and the shared representations of classes.