Android Memory Reclamation with PSI-Driven Process Shutdown
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing Android systems inefficiently manage memory, leading to slowed device performance and reduced user experience due to applications occupying background memory without effective memory release mechanisms.
Innovation Solution
A memory management system for Android systems, comprising a framework layer, native layer, and kernel layer, with components like MiuiMemoryService, Mi memory manager, and Reclaim interface, actively manages memory by determining pressure stall information (PSI) and proactively shutting down processes to reclaim memory.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If multiple applications are maintained in the background to improve quick startup, then application residency is improved, but device running speed deteriorates due to memory occupation
Solution Approach 1:
The patent implements dynamic memory management by continuously monitoring memory usage and application activity levels. The system adjusts the number of background applications based on real-time conditions, switching between maintaining applications for quick startup and releasing memory for system performance based on current system state
Solution Approach 2:
The system changes the parameter of application residency by controlling how long applications remain in background memory. Based on memory pressure and activity levels, the system dynamically adjusts retention time, releasing applications when memory is needed and maintaining them when system resources are充足
2Quantity of substance
If Low Memory Killer kills one application once to release memory, then memory is released, but memory release speed is slow and memory cannot be fully utilized
Solution Approach 1:
The system performs preliminary actions by proactively identifying and releasing background applications before memory becomes critically low. The multi-threaded architecture pre-processes application selection and memory release operations, so when memory pressure occurs, the system can quickly execute pre-prepared release actions
Solution Approach 2:
The patent segments the memory release process into multiple independent threads that can simultaneously identify, select, and release different background applications. This parallel processing approach divides the single slow release operation into multiple concurrent operations, dramatically increasing memory release speed
3Reliability
If background applications occupy memory to maintain residency, then application quick startup is improved, but system fluency deteriorates
Solution Approach 1:
The system implements feedback mechanisms by continuously monitoring system fluency metrics, memory pressure levels, and application activity. Based on this feedback, the system dynamically adjusts background application retention, releasing applications when fluency deteriorates and maintaining them when system conditions are favorable
Data Source
AI summary
A memory management method and system for an Android system, and a storage medium. The Android system includes a framework layer, a native layer and a kernel layer; the memory management system includes a service component on the framework layer, a memory manager on the native layer and an interface reclaimer on the kernel layer; the service component communicates with the memory manager and the interface reclaimer, respectively; the memory manager is configured to determine a memory event based on pressure stall information (PSI) obtained from a hook on a memory reclaim path, and report the memory event to the service component; and the service component is configured to call the interface reclaimer in response to the memory event being an event of reclaiming memory based on a process, and shut down a corresponding process interface by the interface reclaimer.


