Meta

Tag: Scheduler

One of the many misconceptions which people have about Android, is that it is another flavor of Linux, because it uses the Linux kernel. Android is not Linux, and for that reason, also does not have ‘‘. is a Linux daemon, which allows for the background scheduling of services, that are kept in non-volatile memory. Android does not have this.

The background scheduler which Android uses, is based 100% in volatile memory. What this means is that a given app needs to have run at least once in any given session – i.e. since the last reboot – in order to place an ‘Alarm’ in the background scheduler, for itself to be woken again, according to the clock of the Android device.

This fact can confuse people, because additionally, certain apps have it as their privileges, that a part of themselves should be run once, when our Android device first boots. I.e., if the programmer decides that his app should run in the background, even if a user has never launched it, then he must first arrange to have a part of that app run once, every time the device boots, so that that part of the app can register scheduled re-awakenings of itself afterward.

But what that also means, is that if a user has 200 apps installed as I do, only some small subset of those are set to run when the device is rebooted. Facebook and Twitter happen to be among those. But after that, as I run more and more of my apps in a given session, more and more alarms get registered, so that the device is in standby potentially less and less, and so that my battery consumption also gets worse.

Further, many people like for their apps to give them push notifications. Well, as we run these additional apps, they also re-register with whatever server they are supposed to receive push notifications from, which means that the apps are receiving more push notifications as the session continues. And then our CPUs stay in low-power mode for less and less time.

So it is a good idea, to reboot our devices from time to time, for a number of reasons, not just for the reason I explained here.

Also, Android has a separate list of Accounts, that are specifically listed in the System Settings. Android will make sure when it boots, that all the accounts there which are set to sync, are in fact registered. A longer list of accounts also means greater battery consumption. In fact, I am sure that Android will periodically rescan the accounts there, to make sure that their connection to the server is ‘alive’, as our device disconnects from and reconnects to the network.