Resolving Symbolic References in Virtual Machine In-Place Execution
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In-place execution in Java Virtual Machines is hindered by slow execution speed due to the need for symbolic references, which introduce additional indirection and costly lookups, limiting its adoption in memory-constrained devices like mobile phones despite offering memory and battery savings.
Innovation Solution
A system that efficiently resolves symbolic references by using a chain of unresolved symbol values with token and offset values to look up corresponding resolved references in an unresolved symbol table, allowing direct access and replacement of symbolic references, thereby reducing the need for costly lookups.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If symbolic references are used in in-place executable files to enable portability and relocation, then adaptability is improved, but execution speed deteriorates due to additional indirection and costly symbolic lookups
Solution Approach 1:
The patent applies preliminary action by pre-resolving symbolic references to their target addresses during the loading phase before execution begins. The system performs symbolic lookup and resolution in advance, replacing symbolic references with direct addresses, so that during runtime execution, no additional symbolic lookup is needed, thus eliminating the speed penalty while maintaining portability.
Solution Approach 2:
The patent introduces an intermediary mechanism - a resolution cache or table - that stores the mapping between symbolic references and their resolved addresses. This intermediary structure allows the system to resolve symbolic references efficiently by checking the cache rather than performing full symbolic lookups, thereby reducing the indirection overhead while preserving the ability to handle relocatable code.
2Quantity of substance
If in-place execution is implemented to reduce memory consumption, then memory efficiency is improved, but execution speed deteriorates due to immutable code and symbolic reference resolution overhead
Solution Approach 1:
The patent applies preliminary action by performing all symbolic reference resolution during the loading phase before execution begins. The system pre-computes and stores the resolved addresses in a cache, so that during runtime, the immutable in-place executable code can be executed directly without any symbolic lookup overhead, thus maintaining both memory efficiency and execution speed.
Solution Approach 2:
The patent implements self-service by having the loading system automatically resolve and cache all symbolic references during the loading phase, so that the execution phase does not need to perform any additional resolution work. This self-service approach eliminates the runtime overhead while preserving the memory benefits of in-place execution.
3Adaptability or versatility
If symbolic lookup is performed at runtime to resolve references, then dynamic linkability is improved, but execution speed deteriorates due to costly hashtable lookups
Solution Approach 1:
The patent applies preliminary action by performing symbolic lookup and resolution during the loading phase before execution begins. The system pre-resolves all symbolic references and stores the results in a cache, so that during runtime execution, references can be resolved immediately from the cache without performing costly hashtable lookups, thus maintaining dynamic linkability while eliminating the speed penalty.
Solution Approach 2:
The patent uses copying by creating a resolved copy of the symbolic reference information during the loading phase. The system copies the symbolic reference data into a resolution cache with pre-computed addresses, allowing runtime execution to use this copied resolved information instead of performing repeated symbolic lookups, thereby maintaining dynamic linkability while improving execution speed.
Data Source
AI summary
One embodiment of the present invention provides a system that facilitates efficiently resolving symbolic references in a virtual machine to support in-place execution. During operation, the system loads an in-place executable file into the virtual machine, and receives a pointer that points to an unresolved symbol value in the in-place executable file. This unresolved symbol value includes an offset value that points to a subsequent unresolved symbol value in a chain of unresolved symbol values within the in-place executable file, and a token value that can be used to look up a corresponding resolved reference value in an unresolved symbol table. The system then uses the token value to look up the corresponding resolved reference in the unresolved symbol table, and replaces the unresolved symbol value with the corresponding resolved reference.


