Author: Li Zhiren
The biggest problem with the Android system is that the system is stuck.
A mobile phone, especially after being used for a year, will often become more and more card, card to the APP can not be opened in half a day; card to open the APP, the operation of two times and crash; card to restart frequently to alleviate the caton; card to the mobile phone hot, people are always worried that the mobile phone will explode...
Sometimes it gets stuck, and it can really kill people.
The Caton problem is indignant, consumers can't stand it, and mobile phone manufacturers are also worried. In order to solve the problem of Caton, Android mobile phone manufacturers have used all their strength, on the one hand, to continuously increase the mobile phone running memory - 2GB, 4GB, 8GB, 12GB; on the other hand, for some applications that frequently start themselves, the "kill the background" processing method is adopted to reduce the memory occupation.
Of course, application developers do not want the background process of their software to be "killed" for no reason, some will use Android's floating window mechanism to shrink to a certain corner when the user closes the application, so as to maintain the online process; others will huddle together to keep warm, using Android's "broadcast receiver" chain to trigger background self-start.
A broadcast receiver is a mechanism by which the system responds to the needs of the application.
In addition, mobile phone manufacturers often have some pre-installed APPS, which will be set in the system whitelist in advance to prevent being killed in the background. This is the reason why the memory of Android phones is getting bigger and bigger, but it is still getting more and more stuck.
This impasse can only make mobile phone manufacturers more aggressive to implement the killing backstage strategy, but this will lead to some users using the software process will be maliciously interrupted.
We often encounter the following scenarios -
When you are playing a game, then the leader in the work group to send a notice, you quickly click on the group reply "received", the result of returning to find that the game was killed in the background, to re-enter, at this time your mood will be like a wasteland, above the wasteland is ten thousand alpacas galloping, in front of an abyss, the bottom of the abyss is written in a big line - "change the phone.".
Imagine a game in a pinch and end up being killed backstage for replying to a message...
When you install a sleep monitoring APP, you want to monitor your sleep quality, know what you said in your dreams at night, and get up the next day to see, because of the screen, the monitoring APP was killed in the background, and nothing was monitored.
If the above needs belong to the order of magnitude of "no pain and no itch", which can be tolerated, then for the visually impaired, it is intolerable. According to Lei Technology, in 2018, some developers complained that the barrier-free applications they developed were often killed by the system for no reason in the background, and these applications originally needed to run silently in the background to help the visually impaired read the screen and operate the mobile phone.
Accessibility apps are killed in the background, which makes visually impaired people how good?
As opposed to Android, Apple's processing method is crisp and sharp, because Apple has no "background" at all, so naturally there will be no problem of too many background applications leading to system caton.
Apple, which has no background, how can it call the interface before leaving the application when switching between multiple applications? This is the role of Apple's "tombstone" mechanism, Apple will intercept the page at the time of the retention switch before the application is switched, and restore it to the original interface when the user returns. While the real process is much more complex than that, the rationale is roughly the same.
Android was originally a multi-background processing system based on the Transformation of Linux System, and there would be many technical difficulties if the "Tombstone" mechanism was introduced. But as an Android developer, Google naturally won't sit back and watch Android fall so depraved.
On May 11, Google will hold an "I/O conference", when Google will release the latest version of the operating system Android 13. According to XDA, Google added a piece of code related to memory, multitasking optimization for the Android 13 kernel, mainly related to MGLRU (Multi-Generational Least Recently Used), a multi-page recycling strategy.
MGLRU has already been tested on Chrome OS and is now going to be applied to Android 13.
According to Google tests, with mgLRU, kswapd CPU usage is reduced by 40% (kswapd is the process that manages virtual memory). In addition, a background manslaughter is reduced by 85% at 75% memory usage and 18% by render latency at 50% memory usage.
That is to say, MGLRU will solve the two key problems of killing the background and the system stuttering at the same time, which is conducive to improving the fluency of the system and enhancing the background experience of the application.
It seems that Android phones are going to fly as fast as Apple phones, are you looking forward to it?