Samsung Galaxy Note. First Look
Today, large companies, especially corporate giants like Samsung, do not surprise users with extraordinary products...
|First look. Sony ST21i Tapioca Microsoft Windows Phone 7: Reasons for Failure First Look at Samsung Galaxy S3 as a 2012 Flagship|
Myths about the Multitasking and Resources Hungry Android
This review was inspired by the podcast of Yuriy Trukhin and Eldar Murtazin, where they were not completely correct as to the multitasking in Android and why does it need task managers. Multitasking in Android is similar to that of forthcoming Mango for WP7. Even details and names of architectural solutions are similar.
Many people misinterpret the multitasking in Android. The blame must be laid onto Google incapable of explaining to ordinary users who it works inside and that task managers are more harmful than useful.
So comes the first myth: if you open many apps in Android there will be not enough of memory for hungry software and the phone will work much slower.
There is a bit of truth in the statement, but do not forget the nuances. All applications for Android are made of modules, in other words an app contains many independent elements (unless they are connected with another module). The presence of the app in the memory does not mean it is fully used at the moment. It may be idle and not executing any code. It is located in the memory to ensure the next operation is started faster from the cache. When the memory is needed to other apps the least important modules will be unloaded in accordance with the system of priorities. The same concept of dumping is used in WP7. In this case task managers are harmful, because they unload apps, which have to be loaded again soon, which slows down the process.
The presence of the app in memory does not slow down the phone automatically. It is pointless to free the memory only to boost this parameter.
There is no smoke without fire and I will try to explain why.
This section is slightly too technical and describes the architecture of apps for Android. I would like to tell about the internal structure for readers to get a clear picture of the OS.
In Android all modules are divided into three main types:
Let's analyze them by the example of a music player.
These are windows of our application. Each window represents one activity. In other words a window with the track title, control elements and the album cover is one activity. Its life cycle is extremely short, because when you switch to another window (even within the same app), everything is paused, the resources are freed in a moment and the activity is disabled. In the background nothing is handled as it is not possible this way. When you move away from the player with the nice looking equalizer it will not require any resources as this part of the app is completely idle at the moment.
To be more precise if the app contains activities only (let's say a calculator) it stops consuming resources when you move away from it. It is languishing in the cache waiting for your return.
These are elements of applications responsible for receiving global messages. There are many standard ones and you can expect almost any message to be received if you notify the system about it, which is useful to connect different apps. Messages vary dramatically. It can be a message that the WiFi network is available and you can go online searching for new tracks. When you insert the phone into the dock station a nice window with the clock appears. Press the pause on the headset and the playback stops. This way you can send a picture to Twitter from the gallery: your Twitter app is registered for events like "I can share pictures" and the gallery sends a similar message to all appropriate apps for the user to choose what to do with the picture. It gives flexibility to Android regarding the installation of different apps.
The module stays active as long as it is necessary to handle the message from the system. The app remains in the memory to be on the safe side if the system sends another similar message. Instead of starting the app again it will be called for from the background.
Here the issues with resources start. If the app registers itself to receive a global message the system will always start it and disabling it with the task manager is useless and harmful. On the other hand the application may receive messages only when it is active. For example, the music player must receive messages from the headset to manage the playback and use the pauses if you receive a call. If the app is not active it will ignore these events.
In this case you can disable a useless app from time to time if it sucks in resources for nothing (it often happens when the phone has acres of free memory). One of examples is that of the music and podcast players, which if started simultaneously may compete for the same resources.
Now it is time to mention the least resources efficient elements. Services are components of an app, which must run in the background and have no other purpose. These are tiny blocks active to implement multitasking in Android, iOS and WP7 Mango. These are services of synchronization, updates and downloads. For the music player the track must be played by the services! Even during the call an element responsible for the conversation is the service allowing you to speak and enjoy Angry Birds at the same time.
These are the main users of resources, but task managers do not detect them well. You'd better analyze them in standard Running Services.
Android can disable services when you lack free memory, but they have a priority and the OS will try to run them again to return to the status quo. The highest priority is given to services with the icon in the status bar, no matter how silly it sounds. These services tell the users that they are active and Android keeps them going until the very end. That is why almost all music players have an icon in the status bar.
One remark is necessary as to services in Windows Phone 7 (future Mango). It is called there "Background Agents":
In general WP7 has different implementation, but it makes no difference for users, because the same task is performed. You get a component of the app, which deals with a particular operation.
It is important to understand that different elements of applications can be active at a time and serve different purposes. By disabling the app you make the system load it again. It is necessary to disable unstable apps, which do exist in the Market due to the absence of moderation.
Only small elements of applications will work, but the rest will be hibernating without influencing the system.
Do you want to talk about this? Please, go to our Forum and let your opinion to be known to the author and everybody else.
Published 29 June 2011
Have something to add?! Write us... email@example.com
[ 31-07 16:21 ]Sir Jony Ive: Apple Isn't In It For The Money
[ 31-07 13:34 ]Video: Nokia Designer Interviews
[ 31-07 13:10 ]RIM To Layoff 3,000 More Employees
[ 30-07 20:59 ]Video: iPhone 5 Housing Shown Off
[ 30-07 19:12 ]Android Fortunes Decline In U.S.
[ 25-07 16:18 ]Why Apple Is Suing Samsung?
[ 25-07 15:53 ]A Few Choice Quotes About Apple ... By Samsung
[ 23-07 20:25 ]Russian iOS Hacker Calls It A Day
[ 23-07 17:40 ]Video: It's Still Not Out, But Galaxy Note 10.1 Gets An Ad
[ 19-07 19:10 ]Another Loss For Nokia: $1 Billion Down In Q2
[ 19-07 16:57 ]iPhone 5 To Feature Nano-SIM Cards
[ 18-07 14:20 ]What The iPad Could Have Looked Like ...
[ 13-07 12:34 ]Infographic: The (Hypothetical) Sale Of RIM
[ 13-07 11:10 ]Video: iPhone Hacker Makes In-App Purchases Free
[ 12-07 19:50 ]iPhone 5 Images Leak Again
[ 12-07 17:51 ]Android Takes 50%+ Of U.S. And Europe
[ 11-07 16:02 ]Apple Involved In 60% Of Patent Suits
[ 11-07 13:14 ]Video: Kindle Fire Gets A Jelly Bean