Memory Page Retention for Background App Freezing
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current memory management in mobile devices is inefficient, leading to freezing issues when background applications are reactivated due to inadequate retention of frequently accessed memory pages and excessive resource consumption during memory compression or swapping, which affects keepalive performance and user experience.
Innovation Solution
A method that determines frequently accessed memory pages by identifying pages with page exceptions during hot starts and retains them in memory while swapping out rarely accessed pages to a swap partition, improving resource allocation and reducing freezing occurrences.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Quantity of substance
If memory compression operation is performed to reclaim memory resources, then memory resources are saved, but computing resource overheads increase and compression ratio is limited
Solution Approach 1:
The patent extracts and identifies frequently accessed memory pages through page exception monitoring, then retains only these critical pages in memory while swapping out rarely accessed pages to storage. This selective extraction approach avoids the need to compress all memory pages, thereby reducing CPU overhead while still achieving effective memory reclamation.
Solution Approach 2:
The patent applies different memory management strategies to different memory pages based on their access frequency. Frequently accessed pages (identified through page exceptions) are retained in memory with normal access rights, while rarely accessed pages are swapped to storage. This local differentiation eliminates the need for global memory compression and reduces computing resource consumption.
2Ease of manufacture
If conventional page replacement algorithm uses time duration criterion to determine cold and hot pages, then implementation is simple, but determination accuracy is insufficient and freezing occurs when application is switched back to foreground
Solution Approach 1:
The patent introduces page exception monitoring as a feedback mechanism to detect actual memory access patterns. When a page exception occurs, it provides real-time feedback that a memory page is frequently accessed. This feedback-driven approach dynamically identifies hot pages based on actual usage behavior rather than relying on static time-duration thresholds, significantly improving determination accuracy and preventing freezing during application resumption.
3Quantity of substance
If memory pages are swapped to storage to save memory resources, then memory resources are reclaimed, but time to determine and swap pages increases
Solution Approach 1:
The patent performs preliminary identification of frequently accessed memory pages through page exception monitoring before memory reclamation is needed. By continuously tracking which pages generate page exceptions (indicating frequent access), the system pre-determines which pages should be retained in memory. This preliminary action enables faster, more targeted swapping operations when memory pressure occurs, reducing the time needed for page determination and swapping.
Data Source
AI summary
This application provides a memory management method and a terminal device. According to the method, a frequently accessed memory page and a rarely accessed memory page that are required for starting and using an application may be determined by using a memory page on which a page exception occurs in a target running application. A terminal retains, in a memory, the memory page that is required for starting and using the application, to resolve a problem that freezing occurs when an application that runs in a background is started again, and improve keepalive performance of the application. The terminal migrates the rarely accessed memory page to a swap partition of a storage, to save memory resources.


