Shared Class Loaders for Virtual Machine Memory Optimization

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In client/server systems, the parallel execution of multiple runtime systems leads to resource and time consumption due to the replication of objects and data entities, resulting in increased memory usage and CPU time for tasks like parsing and initializing data structures across multiple virtual machines (VMs).

Innovation Solution

Implementing a shared memory area where data objects can be stored and accessed by multiple VMs, with objects being shared through 'shared closures' that include the initial object and its transitive closure, and using shared class loaders to reduce memory consumption and loading time by storing and accessing shared classes and class loaders in shared memory.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If multiple runtime systems execute in parallel with replicated objects and data entities, then each VM can operate independently with full functionality, but memory usage and CPU time increase due to duplication

Engineering Contradiction:
Improveindependent operation of VMsVSAvoidmemory usage
Core Design Contradiction:
ReliabilityVSQuantity of substance

Solution Approach 1:

The patent segments data entities into shared portions (accessible by multiple VMs) and local portions (specific to each VM). This segmentation allows memory to be divided into shared memory areas and local memory areas, reducing overall duplication while maintaining VM independence through appropriate access controls and synchronization mechanisms.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent creates universal shared data structures that can be accessed and utilized by multiple runtime systems simultaneously. These shared objects serve multiple VMs at once, eliminating the need for each VM to maintain its own complete copy of every data entity, thereby reducing total memory consumption while preserving functional independence through coordinated access.

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

2Reliability

If multiple runtime systems execute in parallel with replicated objects and data entities, then each VM can operate independently, but CPU time increases for parsing and initializing data structures

Engineering Contradiction:
Improveindependent operation of VMsVSAvoidCPU time for parsing and initialization
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent implements preliminary action by pre-parsing and pre-initializing data structures in shared memory areas before they are needed by multiple VMs. When a data entity is loaded into shared memory, it is parsed and initialized once in advance, so that subsequent VMs can access the already-prepared structures without repeating the costly parsing and initialization processes, thereby reducing CPU time while maintaining operational independence.

Inventive Principle:
Principle #10Preliminary action

3Ease of operation

If classes and class loaders are replicated in each VM, then each VM has complete class loading capability, but memory consumption and loading time increase

Engineering Contradiction:
Improveclass loading capabilityVSAvoidmemory consumption
Core Design Contradiction:
Ease of operationVSQuantity of substance

Solution Approach 1:

The patent merges class loading functionality by implementing shared class loaders in shared memory areas that can be accessed by multiple VMs. Instead of each VM having its own complete class loader implementation, the system combines class loading capabilities into shared structures that serve multiple VMs simultaneously, reducing memory consumption while preserving full class loading capability through coordinated access and synchronization.

Inventive Principle:
Principle #5Merging (Combining)

4Ease of operation

If classes and class loaders are replicated in each VM, then each VM can load classes independently, but loading time increases due to redundant operations

Engineering Contradiction:
Improveindependent class loadingVSAvoidclass loading time
Core Design Contradiction:
Ease of operationVSLoss of time

Solution Approach 1:

The patent applies preliminary action by pre-loading classes into shared memory areas before they are needed by multiple VMs. When a class is loaded once into shared memory, it is made available to all VMs simultaneously, eliminating redundant loading operations. Each VM can independently access the pre-loaded classes from shared memory, reducing loading time while maintaining the appearance of independent class loading capability.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS7614045B2Sharing classes and class loaders
Publication Date: 2009.11.03 SAP SE
  • US7614045B2 patent drawing
  • US7614045B2 patent drawing
  • US7614045B2 patent drawing

AI summary

Methods and apparatus, including computer systems and program products, for sharing classes and class loaders. One implementation provides a technique for performing a shared load procedure for a class, performing a post load procedure for the class, performing a shared link procedure for the class, performing a post link procedure for the class, and performing an initialization procedure for the class to reduce memory consumption and class loading time. Through performance of these procedures, a first portion of the class (which may include a class block and object) is loaded into a shared memory accessible by multiple runtime systems, and a second portion of the class (which may include a class static variable) as is stored in a local memory associated with a selected runtime system. A shared master copy of the second portion of the class is also stored in the shared memory.