Application Status Restoration via Physical Memory Mapping After Crashes

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing methods for restoring the running status of an application after abnormal exit rely on periodic backup to disk files, which fail to ensure data integrity and are slow due to large data volumes, leading to inefficient restoration.

Innovation Solution

Store management information of virtual memory areas corresponding to physical memory areas during normal operation, maintain physical pages when the application exits abnormally, and re-establish the mapping relationship upon restart to directly access critical data from physical memory.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If critical data is backed up to disk file periodically, then data loss is prevented, but restoration speed deteriorates due to large data volumes and disk I/O latency

Engineering Contradiction:
Improvedata integrityVSAvoidrestoration speed
Core Design Contradiction:
ReliabilityVSSpeed

Solution Approach 1:

The system pre-allocates and maintains physical memory pages for critical data before abnormal exit occurs. By keeping the physical memory pages allocated and maintaining the mapping relationship in advance, the system enables instant restoration without the need to read from disk, thus resolving the contradiction between data integrity and restoration speed

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent creates a copy of the critical data mapping relationship by storing management information (including physical page frame numbers) in a persistent storage location. This copy allows the system to rapidly restore the mapping relationship without accessing the original physical memory, achieving fast restoration while ensuring data integrity

Inventive Principle:
Principle #26Copying

2Productivity

If physical memory is reclaimed after abnormal exit, then memory resources are reused, but critical data is lost making restoration difficult

Engineering Contradiction:
Improvememory utilizationVSAvoiddata preservation
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent extracts the essential mapping relationship information (virtual-to-physical page mapping) from the full memory context and stores it separately in a persistent format. This extracted information allows the system to restore only the critical mapping relationship without needing to preserve the entire physical memory content, thus enabling memory reclamation while maintaining restoration capability

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The system changes the state of the mapping relationship from volatile (in-memory only) to persistent (stored on disk) by saving management information including physical page frame numbers. This parameter change allows the mapping relationship to survive abnormal exits and memory reclamation, enabling reliable restoration while allowing physical memory to be reused

Inventive Principle:
Principle #35Parameter changes

3Loss of information

If large quantity of data is backed up to disk file, then data completeness is improved, but reading time increases significantly

Engineering Contradiction:
Improvedata completenessVSAvoidreading time
Core Design Contradiction:
Loss of informationVSLoss of time

Solution Approach 1:

The patent extracts only the essential mapping relationship information (virtual address to physical page frame number mappings) from the complete memory state and stores this extracted subset persistently. This extraction approach ensures data completeness for restoration purposes while minimizing the amount of data that needs to be read, thus reducing reading time significantly

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The system performs preliminary action by pre-calculating and storing the mapping relationship information in a persistent format during normal operation. This preliminary preparation eliminates the need to read and process large quantities of data during restoration, as only the pre-computed mapping information needs to be loaded, thus resolving the contradiction between data completeness and reading time

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS12367155B2Method and apparatus for restoring running status of application, and storage medium
Publication Date: 2025.07.22 HUAWEI TECH CO LTD
  • US12367155B2 patent drawing
  • US12367155B2 patent drawing

AI summary

Embodiments of this application disclose a method and an apparatus for restoring a running status of an application, and a storage medium, and relate to the field of software technologies. In embodiments of this application, in a running process of an application, management information of a first virtual memory area corresponding to a first physical memory area is stored. When the application exits abnormally, a physical page of the first physical memory area is maintained, to store the physical page and prevent the physical page from being reclaimed. When the application is restored and started, a mapping relationship between the first virtual memory area and the first physical memory area can be re-established based on the management information of the first virtual memory area.