Why do we not need much memory for Android?

Source: Internet
Author: User

From: http://bbs.hiapk.com/thread-852499-1-1.html

Do not care about the remaining memory size. In fact, many people bring the habit of using other systems. Most Android applications do not exit the design, which is related to the system's scheduling mechanism for processes. If you know Java, you can better understand this mechanism. In fact, similar to Java's garbage collection mechanism, the system has a rule to recycle memory. There is a threshold value for memory scheduling. Only systems below this threshold value will close things that are not needed by a single list. Of course, this value is set very small by default, so you will see that the memory is always at a very small number. But in fact, it does not affect the speed. On the contrary, it accelerates the next application startup. This is one of the advantages advertised by Android. It is not necessary to manually close the process. In particular, software that automatically disables processes.

Some may say here, why is it slow to run large programs when there is little memory? In fact, it is very simple to open a large program when there is not much memory left, it will trigger the system's own process scheduling policy, which is a very expensive operation of system resources, especially when a program frequently requests memory from the system. In this case, the system does not shut down all open processes, but closes them selectively. frequent scheduling will naturally slow down the system. Therefore, there is a program on the forum that can change the memory threshold value to some extent. However, changes may also cause problems, depending on the value setting.

Is process management software necessary? Yes. Before running a large program, you can manually close some processes to release the memory, which can significantly improve the running speed. However, some small programs can be managed by the system itself. When talking about this, some may ask if the program will consume more power. Let me talk about the principles of the android background and you will understand it. When the Android app is switched to the background, it is actually suspended and does not consume CPU resources, but only keeps running. So why does some programs switch out and re-enter the main interface. However, if a program wants to process something in the background, such as playing music, it will enable a service. Services can continue to run in the background, so only applications with services consume power in the background. This can be seen in the process management software. The label is service. I will not talk about broadcasting or anything. Therefore, applications without services have no power consumption in the background, and there is no need to disable them. This design is a very good design. It will be faster when you start the program next time. Because you do not need to read interface resources, why should you disable them to erase the advantages of Android?

There is another one. Why does an Android app seem to consume so much memory. As you know, applications on Android are Java, and virtual machines are required. Applications on Android have independent virtual machines, that is, each application opens an independent virtual machine. The reason for this design is that the failure of the virtual machine can avoid the entire system crash, but the cost is that more memory is needed.

The above design ensures the stability of Android. Under normal circumstances, a single program may crash at most, but the entire system will not crash and there will never be any prompts of insufficient memory. You may be poisoned too deeply by windows and always want to keep more memory, but in fact this does not necessarily increase the speed. On the contrary, it has lost the system feature of fast program startup, it is unnecessary. You may wish to use this system as I said. Finally, we recommend a process management software, which can be found on systempanel and market. The interface is easy to start and has good functions and is used to manually close the process. I wish you a good time playing with the computer. This system has been running for ten days and a half months, but it is not windows.

The above content is post. As to why switching slows down after a large program or several programs are enabled, my understanding is as follows:

1. large program a has been enabled and occupies 70% of the memory. If you want to run another program B and need 50% of the memory, you need to release or compress a from the memory, so it is shown to be slow for a while.

2. A \ B \ c \ D \ e occupies a total of 80% of the memory. Running the new program Z requires 20% of the memory, because the system memory has never seen the remaining 0, that is, there should be a part of idle memory, then we need ~ E. Select one or more of these programs to close. This process also consumes system resources, so it will take a while.

3. That is to say, when you manually kill the program, the system is releasing the memory for the system. Even if you do not kill the system, the system will automatically release the memory when you need it.

4. programs that are not running in the background (No Service) will not consume power even if they are not killed. Programs running in the background (with services), such as playing songs in the background, will certainly consume power.

5. It doesn't mean that killing processes is useless. Otherwise, the author won't recommend process management software. Which of the following services consumes power? the backend is always running. You can see the services, so you should kill them.

6. Take QQ as an example. If you exit normally, the running status of QQ will be left in process management, but the CPU will not be consumed. If you just switch out (press a small house instead of exiting) it will naturally consume power, because the program is still running.

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.