Windows 8 blog talks about power efficiency for apps

The Windows 8 Consumer Preview is just weeks away from being released to the world, and one of the biggest concerns about any operating system, is how it will handle energy consumption.

Microsoft has written in the past about how Windows 8 will be more efficient in terms of battery life. In the latest post on the official Windows 8 blog site, Microsoft's Sharif Farag and Ben Srour write about how Windows 8 will improve the energy efficiency in the OS's applications.

In the blog post, Farag and Srour write:

For Windows 8, we started off with a rule that would apply to the large majority of Metro style apps:  if an app is not on screen, and the screen is not on, it should not impact your battery life. That doesn’t mean WinRT and the user model preclude multi-tasking. There’s a new way of thinking about how and when code takes into account modern hardware capabilities, networking demands, form factors, and reliability/security/privacy. There are going to be some exceptions (e.g. background email syncing, desktop tools), but for the majority of cases, we expect the app to do most of its work while you are actively interacting with it. When an app is not in the foreground, we wanted to ensure that it would either suspend completely, or use limited resources based on a set of common background capabilities (like copying files), which the app can access.

If a Windows 8 Metro app is running in the foreground, it uses a PC's CPU, memory, hard drive, and more just like previous applications for older Windows operating systems. However, app developers can also use Windows 8's new Background Tasks infrastructure. Farag and Srour state that Windows 8 will allow more apps to run via Background Tasks when a PC is plugged into a power outlet. The blog says that this will allow for better battery life because apps will only run when they are really needed.

Windows 8 Metro apps can also suspend apps in the background.  The blog post states that means " ... that the Windows scheduler (the component that schedules CPU access for processes and threads) does not include it in the CPU scheduling. Since the operating system is not scheduling the app, the app is not using the CPU, and it is possible for the CPU to drop into lower power states."

Farag and Srour also state:

The great thing about this new suspended state for your apps is that they are instantly ready for you to get back to them. When you switch to a suspended app, it resumes instantaneously and takes you back to exactly where you left off. With this, you will be able to switch between more apps faster than you ever have before on Windows. You’ll no longer need to care how many apps are running on your PC—with the help of live tiles keeping you informed about what is going in your apps, and the ability for apps to save and restore state, great apps always look like they are running.

Windows 8 won't allow any battery drain or performance issues on a PC even if a PC has a number of suspended apps. However, the upcoming Consumer Preview version of Windows 8 will allow people to close apps if they choose via the Task Manager.

Finally, Windows 8 Metro apps will also be able to handle background tasks. That includes things like downloading a file, playing music, or receiving emails and instant messages.  Microsoft has created a number of scenarios based on the types of applications and what they would do in the background. For example, Windows 8 can still print documents even though the printing app may have moved to the background.

If a Windows 8 laptop PC goes into sleep mode, both regular and Metro apps will be suspended which, of course, extends a laptop's battery life. However, some PCs are rarely turned off. In this case, these special kinds of PCs go into a low energy mode called "connected standby." Farag and Srour state that for those PCs, Windows 8 has a new feature, the “Desktop Activity Moderator." This new feature will suspend all of a PC's desktop apps when it goes into the low powered mode. When such a PC is brought out of its connected standby mode, the apps will resume their activities as if they were brought out of a regular PC's sleep mode.

Report a problem with article
Previous Story

Star Wars Xbox 360 console to go on sale April 3

Next Story

New details on Windows Phone-based LG Miracle

19 Comments

Commenting is disabled on this article.

I was reading through the comments on the 'Building Windows 8' blog - lets just say what ever piece of humanity inside me died pretty quickly. If the replies to the blog are a representation of the Windows user base then I think it is pretty depressing to say the least.

Mr Nom Nom's said,
I was reading through the comments on the 'Building Windows 8' blog - lets just say what ever piece of humanity inside me died pretty quickly. If the replies to the blog are a representation of the Windows user base then I think it is pretty depressing to say the least.

Care to explain it?

Mr Nom Nom's said,
I was reading through the comments on the 'Building Windows 8' blog - lets just say what ever piece of humanity inside me died pretty quickly. If the replies to the blog are a representation of the Windows user base then I think it is pretty depressing to say the least.


I second that.

Isn't this what iOS and Android do now?
Anyway a welcomed update, if you have ever used windows in a business, the sleep modes have always been an issue especially with network connected apps. Finally will be able to use the darn thing and save some power!

TsarNikky said,
The Windows-8 spin for tablets and mobile laptops continues.

I don't know about you but I'm all for my computer using less power. Yes, it's going to be on tablets. That's well established. If you're running a beast of a machine that you've overclocked to the max, I don't think you'll be impacted that much. Like previous iterations of windows, you should be able to adjust the settings to suit your needs.

People are flipping out over nothing. -_-

"Windows 8 won't allow any battery drain or performance issues on a PC even if a PC has a number of suspended apps. However, the upcoming Consumer Preview version of Windows 8 will allow people to close apps if they choose via the Task Manager."

that or you can drag from the top of the app to the bottom and that will close it

dafin0 said,
that or you can drag from the top of the app to the bottom and that will close it

I believe the build at CES showed that off, so I expect this functionality in consumer preview.

The windows 8 and windows phone sleep/power policies make it impossible to keep a metro IRC client active in the background.

The moment you switch to another app, it disconnects.

How else am I supposed to win idle rpg and show off my IRC uptime epeen?

Such apps can either use push notifications or the notification service provided in the WinRT Sockets namespace.

Windows.Networking.Sockets for WinRT apps
The Windows.Networking.Sockets namespace also provides support for notification channels that are used to enable real-time status and notifications for class elements in the Windows.Networking.Sockets and related namespaces. Notification channels are used by long-running network apps to minimize network and system resource usage (an email app that is left running, for example). Notifications allow an app to drop to a low-power mode for periods of time while still keeping network connections intact but in a low-power state

Or, alternatively, just use your current desktop chat application in the desktop environment! You don't NEED to use Metro for everything, especially on a desktop. The introduction of Metro has not suddenly nullified and made redundant all desktop programs going forward.

Edited by ~Johnny, Feb 7 2012, 10:51pm :

Einlander said,
The windows 8 and windows phone sleep/power policies make it impossible to keep a metro IRC client active in the background.

The moment you switch to another app, it disconnects.

How else am I supposed to win idle rpg and show off my IRC uptime epeen?

Exactly what Johnny said. People aren't exactly comprehending that the desktop still exists. You can, if you wish, stay there forever 99% of the time. It's not a difficult concept but people are weary of change. I'm running the dev preview now and love it. I can't wait until the consumer preview.

Hm... Interesting. I guess we'll have to see how this works in practice. For simple Metro apps I think this will work great. The affects this has on the Desktop though I'm very curious about...

M_Lyons10 said,
Hm... Interesting. I guess we'll have to see how this works in practice. For simple Metro apps I think this will work great. The affects this has on the Desktop though I'm very curious about...

None. It says as much in the original article.

~Johnny said,

None. It says as much in the original article.

Windows 8 has a new feature, the “Desktop Activity Moderator." This new feature will suspend all of a PC's desktop apps when it goes into the low powered mode.

? Then I don't quite follow this part here...

M_Lyons10 said,

? Then I don't quite follow this part here...

It's not very well explained in this article - but it's essentially a new type of sleep mode for devices like tablets which *don't* usually get turned off. Typically when you press the power button on those devices, the screen just goes off - but the system is still on and can still do tasks, stay connected to the network, receive notifications, etc, which is unlike sleep mode on a PC where basically everything stops.

For these devices in Windows 8 then, most desktop apps will think the computer is in sleep mode and do nothing, like normal sleep mode, but Metro apps still be able to receive push notification or run small background tasks, to keep their tiles / data upto date, or as the original article puts it: "enabling great connected scenarios, such as always having email up-to-date, and being able to receive instant messages or phone calls, while still delivering amazing battery life".

Basically, the source article has a better explanation

Edited by ~Johnny, Feb 7 2012, 10:01pm :