Managed Runtime Page Sharing for Reusing Non-Position-Independent Code
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional managed runtime environments face challenges in efficiently sharing and reusing live data between applications due to limitations in sharing non-position-independent-code, leading to increased memory usage and runtime overhead.
Innovation Solution
The method involves storing live data from a closed application in non-volatile memory and paging a common portion of this data into volatile memory at the same virtual address for reuse by a subsequent application, allowing sharing of non-position-independent-code without conversion, and using a copy-on-write operation to manage modifications.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If managed runtime applications are executed in the MRTE with resource management instructions, then applications become universally compliant across different operating systems, but memory usage and execution time increase significantly
Solution Approach 1:
The patent creates a copy of the managed runtime environment state (including volatile memory contents and register values) and stores it in a file on the file system. This copy can be reused across multiple applications, eliminating the need to regenerate the same runtime state for each application. The copy mechanism allows sharing of common runtime data structures, class metadata, and compiled code without duplicating the entire runtime environment in memory for each application.
Solution Approach 2:
The patent performs preliminary generation of the managed runtime environment state by executing a representative application or workload beforehand. The resulting runtime state (including JIT-compiled code, class loading data, and memory structures) is captured and stored for future reuse. This preliminary action creates a pre-prepared runtime environment that can be rapidly loaded and applied to subsequent applications, avoiding the need to start from scratch each time.
2Adaptability or versatility
If managed runtime applications are executed in the MRTE with resource management instructions, then applications become universally compliant across different operating systems, but execution time increases significantly
Solution Approach 1:
The patent creates a copy of the managed runtime environment state (including volatile memory contents and register values) and stores it in a file on the file system. This copy can be reused across multiple applications, eliminating the need to regenerate the same runtime state for each application. The copy mechanism allows sharing of common runtime data structures, class metadata, and compiled code without duplicating the entire runtime environment in memory for each application.
Solution Approach 2:
The patent performs preliminary generation of the managed runtime environment state by executing a representative application or workload beforehand. The resulting runtime state (including JIT-compiled code, class loading data, and memory structures) is captured and stored for future reuse. This preliminary action creates a pre-prepared runtime environment that can be rapidly loaded and applied to subsequent applications, avoiding the need to start from scratch each time.
3Quantity of substance
If live data is stored in non-volatile memory and paged into volatile memory for reuse, then memory efficiency improves, but system complexity increases due to paging management
Solution Approach 1:
The patent introduces a file system as an intermediary layer between the managed runtime environment and the persistent storage medium. The runtime state is serialized and stored as regular files, which can be managed using standard file I/O operations. This intermediary abstraction simplifies the complexity of direct memory-to-disk paging by providing a familiar file-based interface for storing and retrieving runtime state, while still enabling efficient reuse of live data across applications.
Data Source
Figure 1~2
Figure 3~4
Figure 5
AI summary
Embodiments of this disclosure allow non-position-independent-code to be shared between a closed application and a subsequent application without converting the non-position-independent-code into position-independent-code. In particular, embodiment techniques store live data of a closed application during runtime of the closed application, and thereafter page a portion of the live data that is common to both the closed application and a subsequent application back into volatile memory at the same virtual memory address in which the portion of live data was stored during runtime of the closed application so that the paged lived data may be re-used to execute the subsequent application in the managed runtime environment. Because the paged live data is stored at the same virtual memory address during the runtimes of both applications, non-position-independent-code can be shared between the applications.