Android does not need to close background running programs

Source: Internet
Author: User
Tags garbage collection

Do not care about the size of the remaining memory, in fact, many people are the habit of using other systems brought here. Android most applications do not exit the design actually makes sense, which is related to the scheduling mechanism of the process. If you knew Java, you would have a clearer idea of the mechanism. In fact, like the Java garbage collection mechanism, the system has a rule to reclaim memory. There is a threshold for memory scheduling, and only below this value system will press a list to close what the user does not need. Of course this value is set very small by default, so you will see memory hovering in very little numbers. But in fact he doesn't affect speed. Instead, it speeds up the next time the application is started. This would have been one of the advantages of Android, and it would be less necessary if people were to shut down the process. Especially software that uses automatic shutdown processes.

Someone here would say, why is it slow to run large programs when there is less memory? In fact, it is very simple to open large programs in the memory surplus, will trigger the system's own process scheduling strategy, which is very consuming system resources, especially in a program frequently to the system to apply for memory. In this case, the system does not close all open processes, but selectively shuts down, and frequent scheduling naturally slows down the system. Therefore, the forum has a change in the memory threshold of the program can be a certain improvement. But the change may also bring some problems, depending on the value set.

So, is there any need for process management software? Before running a large program, you can manually turn off some processes to free up memory, which can significantly improve the speed of the operation. However, some small programs can be completely managed by the system itself.

When it comes to this, some friends may ask whether it will be more power-hungry if you don't close the program. I'll talk about the fundamentals of the Android background and you'll see. When the Android app is switched to the background, it is actually paused, does not consume CPU resources, and retains only the running state. So why do some programs cut out and back into the main interface. However, if a program wants to handle something in the background, such as music playback, it will open a service. Services can continue to run in the background, so the power consumption in the background is only with service applications. This is seen in the process management software, and the tag is service. As for the radio or something, I'm not involved. So no service with the application in the background is completely without power consumption, there is no need to close. This design is a very good design, the next time you start the program, it will be faster, because you do not need to read the interface resources, why should you turn off the advantages of this Android to erase it.

And one of the reasons why an Android app looks so memory-consuming. As you know, Android apps are Java, and of course you need virtual machines, and Android apps come with a standalone virtual machine, which opens up a standalone virtual machine for each application. The reason for this design is to avoid a virtual machine crash causing the entire system to crash, but at the cost of needing more memory.

These designs ensure the robustness of Android, which normally crashes with up to a single program, but the entire system does not crash, and there is never a hint of out-of-memory. Everyone may be poisoned by Windows too much, always want to keep more memory, but in fact this does not necessarily increase the speed, on the contrary, but lost the program to start fast This system features, it is not necessary. You may wish to use this system as I have said.

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.