Mobile battery life (and why Android's may get better thanks in part to Nokia)



Just a week ago, Felipe Contreras (if you've heard about him at all, it's probably as the Nokia engineer who publicly argued with Elop) posted a decently comprehensive explanation of how both Android and Maemo power management work, which I think is interesting regardless of what mobile OS you use, since it articulates the two main approaches an OS could take for saving the battery.

Felipe Contreras: Android vs. Maemo power managment: static vs. dynamic

Now, I'd encourage you all to just read the article, as it's rather well written and informative. I figured I'd highlight a few points anyways.

The idea is very simple; devices should sleep as much as possible.
Perhaps the simplest way to imagine dynamic power management, is the gears of a manual transmission car. You go up and down depending on how much power does the system actually needs.
All this is possible thanks to very small latencies required for devices to go to sleep and wakeup, and have intermediary modes (e.g. on, inactive, retention, off), so, for example a device might be able to go to inactive mode in 1ms, retention in 2ms, and off in 5ms (totally invented numbers). Again, the more sleep, the better. Obviously, this is impossible on x86 chips, which have huge latencies–at least right now, and it’s something Intel is probably trying to improve effusively.

This bit makes me wonder about Intel's forthcoming mobile chips; does anyone know if they have indeed fixed this issue, or will the kind of power management in question here remain out of reach?

Static power management has two modes: on and off. That’s it. OK, that’s not exactly the case in general, but it is in the Android context...The complexity comes from the problem of when to suspend
tl;dr: dynamic pm is better for active usage.

This finally explained to me why my spare Android devices could last so well on standby, but would die far faster than my N900 (or now my N9) when I was actually using them, whereas there wasn't nearly so steep of a battery life dropoff when I was actively using my N9/N900.

Dynamic pm lives on the Linux kernel mainline through the runtime power management API. This is not a Nokia invention that will die with the Nokia N9; it’s a collaborative effort where Nokia, TI, and other companies worked together, and now not only benefits OMAP, but other embedded chips, and even non-embedded ones....Sooner or later your phone (if you don’t have an N9) will benefit from this effort, and it might even be an Android phone, your netbook (if not already benefiting in some way), and even your PC.

And here, actually, we have one of the secret powers of Android (and how a company as small as Palm ever stood a chance of getting back in the mobile battle with WebOS). As long as they do the development The Right Way, every innovation or useful function written for a Linux-based device becomes potentially available for others, and so every product developed on top of Linux includes work done outside of the product (arguably the majority of the work). Here we have work done by TI and Nokia that will likely ultimately benefit Google (I'll skip my rant about Elop throwing away all that hard work). Meanwhile, I've seen commits to Linux-based applications based on patches and other code the WebOS devs wrote. If Tizen ever amounts to anything (which seems unlikely, but worldwide at least Bada certainly sells far more than it has any right to, so it's not impossible) not only will both Android and Tizen benefit from upstream developments, but it's quite possible that work put into their respective OS instances will benefit eachother.

I don't have much more to add myself (other than, again, that anyone interested at all in how mobile OSes deal with battery life should read the original article), but I am curious to hear if anyone knows of any similarly readable articles on specifics of the approaches the other mobile OSes out there take, like WP7 and of course iOS. I'd suspect, from what I know, that iOS uses a very aggresive take on static power management, but I'm certainly not an expert and I'm curious to hear the details.