Program State Capture Without System Interruption
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional methods for archiving or suspending the state of a computer system require interruption, whereas there is a need to capture and restore the state of a running program without interrupting its operation, allowing it to continue running while enabling subsequent recovery to a previous state.
Innovation Solution
A method and apparatus that capture the state of a running program by suspending its threads, accessing and copying its virtual memory, and indirectly capturing unmapped state information, such as GPU resources, without modifying the program's source code, allowing the program to continue running while enabling 'rewind' to a previous state.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Loss of information
If the entire system memory is copied to capture the state, then the complete system state including OS and applications is preserved, but the system operation is interrupted and the whole system must be restored from scratch
Solution Approach 1:
The patent extracts only the necessary program state information (thread data, virtual memory, unmapped state) from the running program, rather than copying the entire system memory. This selective extraction allows capturing the specific program state without interrupting the overall system operation, resolving the contradiction between complete state capture and system continuity.
Solution Approach 2:
The patent segments the program state into distinct components: thread data (registers, program counter, flags), virtual memory data, and unmapped state information. This segmentation allows each component to be captured and restored independently, enabling partial state restoration without requiring full system suspension and restart.
2Reliability
If restore points are used to save previous software settings, then software recovery is enabled, but the current running state of programs cannot be saved or restored
Solution Approach 1:
The patent creates a copy of the program's current running state by capturing thread data, virtual memory, and unmapped state information. This copy can be stored and later restored to replay or analyze the program's execution state, extending restore point functionality from static software settings to dynamic running states without modifying the original program.
3Measurement precision
If the program is suspended to capture its state, then accurate state data is obtained, but the program execution is interrupted
Solution Approach 1:
The patent prepares capture mechanisms in advance by installing hooks and interceptors that can capture program state data without actually suspending the program. The capture process reads memory and registers while the program continues executing, ensuring both accurate state data collection and uninterrupted program productivity.
Data Source
Figure 1
Figure 2
Figure 3
AI summary
A method of capturing the state of a target program that is running within the environment of an OS comprises the steps of identifying threads associated with the target program, suspending threads associated with the target program, preserving data characterising the threads, and preserving data accessible by the threads when in operation; meanwhile, a method of changing the state of a target program that is running within the environment of an OS comprises the steps of identifying threads associated with the target program, suspending threads associated with the target program, replacing data characterising the threads with previously preserved data, and replacing data accessible by the threads when in operation with previously preserved data; in either case, the threads are then resumed to allow the target program to continue operation.