Win8 Quest: Metro applications and battery life are both

  

Microsoft today further explored the work done by Windows 8 PCs to improve battery life. How does Windows 8 save energy while ensuring that applications are at their best?

Focus on the front desk

In Windows 8, Microsoft has adopted a new rule for most Metro style apps: if an app is not running on the screen, the screen will be turned off. Therefore, it does not affect the battery life. This is not to say that WinRT and user mode will block multitasking, which is just a new way of thinking about modern hardware performance, network requirements, performance/security/privacy.

Of course, there are exceptions (such as background email synchronization, desktop tools), but for most applications, the main job is to actively interact with the user. When the application is not running in the foreground, Windows 8 wants them to either be completely suspended or take up only a small amount of resources (such as copying files).

In general, applications in Windows 8 have three states:

1. Run in the foreground;

2. Pause in the background;

3 , perform some specified background activities.

Let's take a look at these three operating states:

1. The foreground runs

The application runs in the foreground, this state is easy to understand, Windows 8 makes it Take advantage of the CPU, hard drive, memory, and all the resources you need. In this state, the Metro style app runs the same as the traditional Windows desktop app.

2, background pause

When you open an application and then switch to another application, Windows 8 will pause it. This means that the Windows scheduler (the component that schedules the CPU for processes and threads) no longer includes it in the CPU schedule. Since the system no longer dispatches the application, it can no longer use the CPU, which helps the CPU into a low-power state, while the CPU's low-power state can greatly extend battery life.

There is a big benefit to this pause state of the application, which is that it can be immediately restored from the suspended state to the working state. When you switch to a paused application, it wakes up instantly and takes you to the state it was in before the pause. This way, you can quickly switch between multiple applications, much faster than traditional Windows desktops.

Suspending the application in addition to enabling fast switching between multiple applications minimizes battery loss without compromising system performance. This is completely different from traditional desktop applications.

In the Windows 8 Developer Preview you can clearly see the status of the application's background pause, open the Task Manager, open many applications, such as stock, news or weather, etc. As you can see in the column, it takes up 0%. Although these applications are still using memory, they are actually dormant and therefore do not affect battery life or system performance.

3, perform background activities

Multi-tasking is easy to implement, but the downside is that if all applications are running in the background, the battery will definitely run out quickly. For mobile phones and laptops, batteries are very important. With this in mind, Windows 8 uses new APIs to replace the background processing of Metro style apps.

Again, your desktop application will still run as it is, and of course they will consume a lot of power as they do today.

In order to achieve the rich application, multi-tasking experience that people enjoy in traditional Windows, and to take into account resource usage, Microsoft listed some common scenarios, and then developed background multi-tasking APIs based on these scenarios. Sets allow applications to run in the background in a low-function, low-resource manner, while allowing developers to focus on the application itself.

Microsoft's listed scenarios include: playing music, downloading or uploading files from websites, real-time updates of Live Titles content, printing, receiving VoIP calls, receiving text messages, receiving emails, and sharing content ( For example, upload photos to Facebook), sync content with other devices (such as syncing photos).

For example, background download or upload: This is a very common scenario, the application can use the new background transfer API to perform upload or download work in the background. This API Microsoft calls it “all-round broker” People & rdquo;, meaning that the operating system itself performs upload/download work, the application code is kicked out, which greatly saves the battery.

Microsoft has adopted a new smartphone-like power mode for a range of PCs, especially based on SoC architecture, which does not require a shutdown when not in use, but instead enters a low power consumption. The running state. This new state is called & ldquo; Connected Standby, which enables some connected scenarios, such as instant updates to Email, SMS or phone calls, and has no effect on battery life.

Summary:

Windows 8 has taken many improvements to improve battery life, and Microsoft has designed a new application model to provide long-lasting battery life. Applications designed for Windows 7 can still run on Windows 8 to existing models. Thanks to the back-end architecture provided by the operating system, Metro applications can run in a more energy efficient way.


Copyright © Windows knowledge All Rights Reserved