No obsessive-compulsive disorder: Android multi-task mechanism

Source: Internet
Author: User

Why don't I need to clear the memory?

The habit of clearing memory has been around for a long time. Before Android was born, we had to shut down all unused processes when using Windows so that they would not "occupy memory" or "occupy CPU ", the computer won't "card ". Most of the "security software" is to help users clean up the memory in Windows, clear the garbage and raise the name) This is the historical reason for clearing the memory. However, Android is a completely different memory management mechanism than Windows...

Background:

Android inherits and improves the Linux memory management mechanism based on the Linux kernel.

Android memory management mechanism:

The above can explain the reason why there is always a small amount of memory available for Android. "But will processes run in the background consume much traffic ?" Continue to explain this ......

Android multitasking mechanism:

When a process is switched to the background, the system suspends the process. It does not consume cpu resources. It only retains the running status in the memory and sets the priority based on the application itself.

Seven priorities:

Conclusion

In summary, normal user applications become background processes after exiting, or empty processes. These processes have been suspended and do not occupy CPU resources or power. When there is not enough memory, the user needs to open another application, it will be cleared automatically, so there is no need to clear the memory. On the contrary, sometimes the system needs to use a lot of power and CPU to restart the necessary processes after the memory is cleared.

But why do some applications still consume power and traffic after they are turned off? The only answer is that this is an uneasiness application. When writing an application, the application author applies for various primary and secondary services for the application. As a result, the user continues to run after exiting. The "XX battery doctor" and "XX mobile assistant" in the drop-down notification bar are the most powerful backend operations ".) This phenomenon is particularly common in some domestic applications. In the face of these messy and unconscientious applications and application authors, We Will unmount them and rush them into the trap. Negative comments!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.