Persisting Native Code in Database VMs to Reduce Startup Latency

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing Java Virtual Machines (JVMs) discard dynamically compiled native code when a VM instantiation ends, requiring recompilation upon restart, which is inefficient and slow due to the need for code adaptation and extra instruction insertion.

Innovation Solution

A computer system automatically compiles and persists machine instructions into a database management system, converting intermediate-level language software into native code when frequently executed, and executes the native code directly without adaptation, while maintaining compatibility checks to avoid unnecessary recompilation.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Device complexity

If dynamically compiled native code is discarded when VM instantiation ends, then the system is simple to implement, but startup latency increases due to recompilation requirements

Engineering Contradiction:
Improvesystem implementation complexityVSAvoidstartup latency
Core Design Contradiction:
Device complexityVSLoss of time

Solution Approach 1:

The patent applies preliminary action by persisting dynamically compiled native code to a database before VM instantiation ends. This allows the code to be readily available when the VM restarts, eliminating the need to wait for recompilation and thereby reducing startup latency while maintaining implementation simplicity.

Inventive Principle:
Principle #10Preliminary action

2Loss of time

If native code is persisted across VM instantiations, then startup latency is reduced, but system complexity increases due to code persistence and compatibility management

Engineering Contradiction:
Improvestartup latencyVSAvoidcode persistence management complexity
Core Design Contradiction:
Loss of timeVSDevice complexity

Solution Approach 1:

The patent implements feedback mechanisms through version identifiers and dependency tracking that automatically detect when persisted native code becomes incompatible with the current VM state. This feedback system enables the database management system to selectively invalidate and recompile only the necessary code, managing complexity through automated compatibility verification rather than manual intervention.

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The patent uses parameter changes by tracking version identifiers of the virtual machine and database management system. When these parameters change, the system detects the change and determines whether recompilation is necessary, thereby managing the complexity of persisted code through parameter-based compatibility checks.

Inventive Principle:
Principle #35Parameter changes

3Reliability

If compatibility checks are performed before executing persisted native code, then execution reliability is improved, but processing overhead increases

Engineering Contradiction:
Improveexecution reliabilityVSAvoidprocessing overhead
Core Design Contradiction:
ReliabilityVSUse of energy by stationary object

Solution Approach 1:

The patent applies partial action by performing selective compatibility checks only on persisted native code that may be affected by VM or database changes. Rather than verifying every piece of persisted code, the system uses version identifiers and dependency tracking to identify only the relevant code that requires verification, thereby maintaining high execution reliability while minimizing processing overhead.

Inventive Principle:
Principle #16Partial or excessive action

Data Source

PatentUS8037460B2Code persistence and dependency management for dynamic compilation in a database management system
Publication Date: 2011.10.11 ORACLE INT CORP
  • US8037460B2 patent drawing
  • US8037460B2 patent drawing
  • US8037460B2 patent drawing

AI summary

Software expressed in an intermediate level language is stored into a database and interpreted in a virtual machine in a database management system. A dynamic compilation process in the database management system asynchronously converts the software into native code when predetermined conditions are met. Thereafter, the compilation process persists the native code into the database. At the time of persisting the native code, the compilation process also stores in the database, an indication of any properties that are used in compilation of the native code. At run time, when the native code needs to be executed, the virtual machine checks if the indication stored in the database matches a new indication of the constants, and if they do the persisted code is executed or else the persisted code is invalidated. The persisted code is also invalidated when a new version of ILL software is stored into the database.