• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

What does it mean to keep CPU awake?

dm88

Member
I noticed in some other posts about battery life and 4G vs. wi-fi people mention something about keeping the CPU awake. What exactly keeps it awake (which I assume uses battery)? For example under the battery status, it shows a time for CPU total and keep awake. Can someone explain those?
 
I'll just shoot from a general perspective.

You have two cores or "cpu's" presented to the operating system. Depending on the scheduler and active tasks, there are different levels of these cores and how they perform.

Typically, you have a core active and this can scale up or down based on activity. I forget which scheduler is active on ICS/RAZR now, but the second core can have a different function/scale than the first core.

Good example, when you launch a game, initially 1 core could hit 100% cpu or around there. If it's set for multi-threaded or if it hits processor affinity settings, the second core can fire up to 100% or a scale less than 100%

When your phone is idle, both cores can scale down in ghz/mhz.... So when it's sleeping you might only have one core fired up and only running at 200 mhz. This saves a LOT of battery when idle.

edit: even simpler, you fire up more tasks, you push the gas pedal down more. If those tasks require a lot of HP, the gas pedal is floored. Battery life is your gas tank.
 
That makes a lot of sense, thanks. So does being in a weak 4G area keep it awake because it is constantly searching for a good signal and jumping back and forth between 3G and 4G? Does having a push Exchange account keep it awake too since it is always syncing?
 
The radio requires more power to transmit. Is the OS taxed more, probably not much. These are probably recorded under android OS, but I'm not 100 percent positive, but that does make sense.

For example, in a laptop with wifi... are you going to be able to see if wifi is struggling with transmission and consuming a large amount of power? Probably not, there are usually low level calls to see this on an OS. Again, I think that it's reported in android os in the battery app, but I would have to confirm.

Yes, I'm an engineer, and yes, linux is a specialty. I just haven't taken a deep dive into these phones yet. Cursory, yes.

edit: google cpu schedulers and processor affinity if you want to read stuff that nobody cares about, lol.
 
Back
Top Bottom