Persisting Native Code in Database VMs to Reduce Startup Latency
Find Innovative SolutionsGenerate 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
Engineering 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
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.
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
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.
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.
3Reliability
If compatibility checks are performed before executing persisted native code, then execution reliability is improved, but processing overhead increases
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.
Data Source
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.


