Android Task Killers: How do killing background tasks and services actually help?
2012-01-23 18:35
411 查看
http://kschang.hubpages.com/hub/Android-OS-Task-Killer-beneficial-or-placebo-only
rate or flag this pageTwitter
Facebook
By kschang
task killers that will kill programs resident in memory, and promises to make your phone use less power and be more responsive. Do they actually work? Or are they just placebo? To answer the question, first we have to know how Android OS works.
Advanced Task Killer by ReChild
Source: http://appstorehq-production.s3.amazonaws.com/adva...
Ads
by Google
you quit the program, the program unloads from RAM, but stays in the prefetch, so it can be retrieved quickly if you want it again. Prefetch also predicts what you will want to use next, and prefetches some of that, to improve response speed.
In later versions of Windows, such as Vista and Win7, the main memory is used as much as possible to help with the prefetch.
A mobile OS, such as Android, do something very similar. The difference is in Android OS, program that 'ended' are not actually unloaded from operating memory, until other programs actually request more memory. By keeping program in memory, it can be immediately
accessed again. If a request for more memory is made, THEN existing programs are killed, based on the use frequency, to make more room for the new program.
Most Android programs do NOT have a "quit" function at all. As the not-running programs *do* remain in memory, but NOT accessed, they cannot slow down the system.
Furthermore, since Android system powers all memory at once, not selectively, killing programs not being used actively will not save any power at all.
Thus, killing regular running process does NOT make your system more responsive, nor does it save power. Any claims that they do so is a myth.
Evo / Incredible have 512 MB of RAM.
Consider that the system itself needs 50-100 MB of RAM to run, and each "service" (used to power widgets, inputs, and background apps) needs another 2-15 MB of RAM, AND the apps are stored into RAM, there really isn't much memory left on a phone with 256
MB of RAM. The situation is much smoother on 512 MB of RAM.
The Android OS will kill off programs that are not immediately needed when it needs to load another app (such as receiving email, making or receiving calls, and such). However, you can't control what was killed. You can't specify "kill this, but not that".
Task Killers allow you to anticipate the automatic killing process by killing off programs except those in the "ignore list". If there's enough space, no automatic killing need to take place. However, if that is not sufficient, apps and services will still
get killed.
If you kill an existing component that the OS still needs because there are other programs calling it, Android OS will simply restart it immediately. If it is needed later, the task will be killed now, but restarted when it is called. However, not all services
and other programs will gracefully accept the "lag" which the OS needs to restart the program. That's why sometimes you will see this "Force Close / Wait" dialog box, when the Activity (UI) calls the other parts of the app, but did not get a response back.
If there is enough memory, then Task Killer will only slow the system down as takes stuff OUT of memory only to see them loaded back in when they are called again.
Thus, Task Killers are NOT needed on phones with 384 MB or more memory.
In contrast, a web browser has no more activity to perform upon the end of the surf session, until it receives another user command.
Thus, if you exit out of a web browser, the app will be deactivated (i.e. not unloaded, just no longer run). However, if you exit out of a game, all of the ancillary processes, such as broadcast receiver, service, and so on will need to be killed in addition
to the "activity" UI. That's why some apps (esp. those that run in the background, like Pandora, or Google Navigation) have their own "Quit" or "Exit" button, and most apps do not. Then you hit "back" and you ended up on the "desktop" or workspace, the app
is considered " inactive".
Yet you *can* task switch out of active games and such, and those apps, with still running services and such, can eat up battery. And because there is no "task manager" in Android, such processes can be "hidden".This is the instance where task killer can
wipe out such processes, and prevent the battery from running down. However, it is a "scorched earth" solution, when there are "smart bomb" solutions.
By using a "task manager" such as AppSwipe!, which lets you choose among running apps, so you can quit them from within, you can kill apps without using task killer indiscriminately.
its uses. However, you don't need more than one, and running them more than once a day is unnecessary unless you deal with VERY buggy apps.
Android Task Killers: How do killing background tasks and services actually help? Should you kill tasks at all?
86rate or flag this pageTwitter
By kschang
Introduction
Android Marketplace has a dozen differenttask killers that will kill programs resident in memory, and promises to make your phone use less power and be more responsive. Do they actually work? Or are they just placebo? To answer the question, first we have to know how Android OS works.
Advanced Task Killer by ReChild
Source: http://appstorehq-production.s3.amazonaws.com/adva...
Ads
by Google
Mobile OS vs. Desktop OS
In a desktop OS, such as Windows, when you run a program, the OS will search the "prefetch" cache, and load from that if available. If the program is not in the prefetch, then it will be loaded from the hard drive, with a copy loaded into prefetch. Whenyou quit the program, the program unloads from RAM, but stays in the prefetch, so it can be retrieved quickly if you want it again. Prefetch also predicts what you will want to use next, and prefetches some of that, to improve response speed.
In later versions of Windows, such as Vista and Win7, the main memory is used as much as possible to help with the prefetch.
A mobile OS, such as Android, do something very similar. The difference is in Android OS, program that 'ended' are not actually unloaded from operating memory, until other programs actually request more memory. By keeping program in memory, it can be immediately
accessed again. If a request for more memory is made, THEN existing programs are killed, based on the use frequency, to make more room for the new program.
Most Android programs do NOT have a "quit" function at all. As the not-running programs *do* remain in memory, but NOT accessed, they cannot slow down the system.
Furthermore, since Android system powers all memory at once, not selectively, killing programs not being used actively will not save any power at all.
Thus, killing regular running process does NOT make your system more responsive, nor does it save power. Any claims that they do so is a myth.
Where did the Myth Came From?
The myth that you need Task Killers came from the days when Android phones come with VERY little memory. The original TMobile G1 had only 192 MB of RAM. The Motorola Droid came with 256 MB of RAM. Modern Android phones like Samsung Galaxy S series or HTCEvo / Incredible have 512 MB of RAM.
Consider that the system itself needs 50-100 MB of RAM to run, and each "service" (used to power widgets, inputs, and background apps) needs another 2-15 MB of RAM, AND the apps are stored into RAM, there really isn't much memory left on a phone with 256
MB of RAM. The situation is much smoother on 512 MB of RAM.
The Android OS will kill off programs that are not immediately needed when it needs to load another app (such as receiving email, making or receiving calls, and such). However, you can't control what was killed. You can't specify "kill this, but not that".
Task Killers allow you to anticipate the automatic killing process by killing off programs except those in the "ignore list". If there's enough space, no automatic killing need to take place. However, if that is not sufficient, apps and services will still
get killed.
If you kill an existing component that the OS still needs because there are other programs calling it, Android OS will simply restart it immediately. If it is needed later, the task will be killed now, but restarted when it is called. However, not all services
and other programs will gracefully accept the "lag" which the OS needs to restart the program. That's why sometimes you will see this "Force Close / Wait" dialog box, when the Activity (UI) calls the other parts of the app, but did not get a response back.
If there is enough memory, then Task Killer will only slow the system down as takes stuff OUT of memory only to see them loaded back in when they are called again.
Thus, Task Killers are NOT needed on phones with 384 MB or more memory.
Is the program still running?
A game that runs in "real-time" would have multiple portions: an activity to detect user input, a broadcast receiver to receive tilt sensor and button messages, a service to do background processing, and so on.In contrast, a web browser has no more activity to perform upon the end of the surf session, until it receives another user command.
Thus, if you exit out of a web browser, the app will be deactivated (i.e. not unloaded, just no longer run). However, if you exit out of a game, all of the ancillary processes, such as broadcast receiver, service, and so on will need to be killed in addition
to the "activity" UI. That's why some apps (esp. those that run in the background, like Pandora, or Google Navigation) have their own "Quit" or "Exit" button, and most apps do not. Then you hit "back" and you ended up on the "desktop" or workspace, the app
is considered " inactive".
Yet you *can* task switch out of active games and such, and those apps, with still running services and such, can eat up battery. And because there is no "task manager" in Android, such processes can be "hidden".This is the instance where task killer can
wipe out such processes, and prevent the battery from running down. However, it is a "scorched earth" solution, when there are "smart bomb" solutions.
By using a "task manager" such as AppSwipe!, which lets you choose among running apps, so you can quit them from within, you can kill apps without using task killer indiscriminately.
Conclusion
You have learned a little about how Android OS works, and why a task killer may not be the optimum solution to a slow phone or battery drain. This is not to say that all task killers are bad. I use Advanced Task Killer myself, occasionally. So it does haveits uses. However, you don't need more than one, and running them more than once a day is unnecessary unless you deal with VERY buggy apps.
相关文章推荐
- How do you manage time and prioritise tasks
- Android Programming: Pushing the Limits -- Chapter 6: Services and Background Tasks
- AndroidAnnotations——BackgroundTasksAndActivityBinding后台任务和activity绑定
- AndroidAnnotations——BackgroundTasksAndActivityBinding后台任务和activity绑定
- android graphic(19)—why Android's UI was designed the way it is and how it actually works
- Android Build System ---- how to add your product and board config *.mk
- What is tethering and how do you enable tethering?
- How do I convert between tuples and lists?
- Launching Tasks in the Foreground and Background
- android 之 Tasks and Back Stack
- How do I build the Android SDK with hidden and internal APIs available?Creating a module library and
- Android开发者指南(16) —— Activity and Task Design
- Android Api Component---翻译任务和回退栈(Tasks and Back Stack)
- How to distribute your own Android library through jCenter and Maven Central from Android Studio
- [iOS/Android开发之WebService]How to write a webservices using php with json format
- How Do I Compare Two Files and Show The Differences?
- How to read Android crash log and stack trace
- How to set up a link betwteen a real Android cell and Ubuntu System by adb
- Android LruCache : how to put and get user's data
- How to fix hung_task_timeout_secs and blocked for more than 120 seconds problem