Memory Reclamation via Dynamic Process Selection
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
As terminals like smartphones and tablets accumulate unused processes and cached data, available memory decreases, leading to intermittent stops and prolonged response times due to inefficient memory management practices.
Innovation Solution
A memory reclamation method that dynamically creates a background process list sorted by application importance and process priority, allowing for proactive memory reclamation by identifying processes to be terminated based on memory pressure thresholds, thereby reducing the likelihood of terminal stops.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Quantity of substance
If system memory cleanup operation is started when available memory is insufficient, then memory availability is improved, but application response time deteriorates due to blocking in waiting state
Solution Approach 1:
The patent applies preliminary action by proactively reclaiming memory from background processes before the system actually runs out of memory. The memory management module continuously monitors available memory and triggers reclamation operations when memory usage reaches predefined thresholds, rather than waiting for memory exhaustion. This advance action prevents the need for urgent memory cleanup that would block applications, thus resolving the contradiction between maintaining memory availability and avoiding application response delays.
2Quantity of substance
If memory is reclaimed from background processes, then available memory is improved, but system complexity increases due to process management overhead
Solution Approach 1:
The patent implements self-service by enabling background processes to automatically release their own memory resources when the memory management module sends reclamation requests. The kernel receives these requests and facilitates the memory release without requiring complex manual intervention or detailed process management. This self-service mechanism simplifies the overall system architecture while effectively increasing available memory through automated background process memory reclamation.
Data Source
Figure 1
Figure 2
Figure 2A
AI summary
Embodiments of the present invention disclose a memory reclamation method and apparatus. The method includes: when it is determined that current available memory of a system is less than a memory threshold, determining a process for which memory is to be reclaimed from a background process list, where the background process list includes a process of one or more applications, the process for which memory is to be reclaimed is a process that is among the process of the one or more applications and that meets a condition that an absolute value of a difference between memory occupied by the process and a memory pressure value is less than a preset threshold, and the memory pressure value is a difference between the memory threshold and the current available memory of the system; and sending a processing instruction to a system kernel, to trigger the system kernel to perform processing on the process for which memory is to be reclaimed, so as to reclaim the memory occupied by the process for which memory is to be reclaimed. By implementing the embodiments of the present invention, a probability of intermittent stops of a terminal can be reduced.