Conserve Power in Mobilized Software

Submit New Article

January 25, 2009 8:00 PM PST



Challenge

Enable mobilized applications to conserve battery life and to deliver fast computational and I/O performance. Power and performance must be managed appropriately. Productivity ceases when batteries run out, and applications not optimized for use on mobile platforms do not use our time efficiently. Many applications do not adequately consider the use of these resources.

Applications that make good use of computing resources and squeeze as much computing time as possible from notebook batteries are sure to win favor from users. In many cases, a competitive advantage is available to those ISVs that provide multiple power-usage states for those situations where the system needs to conserve energy. Power-hungry applications can scale performance; for example, when the system switches to battery power or reaches a low battery level.

One must also consider power-management policies at the operating-system and platform levels. Because of the high percentage of power consumption accounted for by the display, decreasing display brightness significantly increases battery life. Setting the power-management schema to portable/laptop in Windows* XP standard power management, or to an equivalent setting for "adaptive throttle mode" enables Intel SpeedStep® technology.

Intel SpeedStep technology provides techniques to lower both power and voltage consumption when battery power is used, balancing power and processor performance. This technology allows applications to perform tasks quickly, followed by idle time with low power consumption.

Efficient management of the delicate balancing act between power and performance prevents loss of productivity. Since the time and facilities to recharge batteries are not always available, it is essential to design both devices and software to be as efficient as possible. Hardware has become more power-efficient, and mobilized-software developers must build on those advances. Mobilized software, which often allows users to set application-specific policies manually, allows workers to remain productive longer.


Solution

Implement three major power-management capabilities: extending battery life, handling system sleep/wake power transitions, and preventing the system from transitioning to sleep mode when the application is in use. When the system is battery powered, applications can extend battery life by scaling the performance or quality of features, turning off background activities, or both. Another important trick is to group work together, enabling the processor to do a large amount of work at once, followed by a long idle time. Designing applications to increase processor idle time leads to longer battery life.

There is no pre-defined list of performance/quality features and background activities for extending battery life; they are specific to each application. Examples of feature scaling while on battery power include the following:

  • Reducing video and audio playback quality in a DVD application.
  • Deferring virus scans on the hard drive.
  • Not synchronizing large mail folders (thereby avoiding download of large attachments).

 

Mobilized software applications can define criteria to determine when and how to extend battery life. These criteria can be based on current battery power status, current system power scheme, or both. Intel SpeedStep technology can optimize computing on mobile devices based on the source of power.

For example, an application can scale performance and power consumption to extend battery life when the percentage of remaining battery power is below a specific threshold or when the system is using a particular power scheme.

An application’s User Interface (UI) can provide options for specifying both how and when to select specific features, to turn off background activities, or both. The need for user input on policy (users know their requirements best) must be balanced with the need for usability (excessive configuration choices may clutter the interface and user experience).

In Windows XP, the sleep power transition refers to switching off the system to a standby or a hibernate mode, and the wake power transition refers to switching on the system from a standby or a hibernate mode. The standby and hibernate modes allow users to switch off and switch on systems much more quickly than the regular shutdown and boot processes.

Applications can improve the user experience by handling system sleep/wake power transitions well. Handling these transitions well means that applications should survive them without a restart, loss of data, or change in state. Applications should also handle the power transitions transparently, with no user interaction.

In Windows, the system’s transition to sleep mode refers to switching off the system to a standby or hibernate mode. To conserve battery power, Windows switches off the system to a standby or hibernate mode when it does not detect certain activities for a specific period. While Windows does not automatically detect disk activity, CPU activity, or display activity, it does detect keyboard input, mouse input, server a ctivity, and changing window focus.

Applications like video players and presentation managers display video for long periods without any user input, which can cause the operating system to switch off the system display. This is a good example of an opportunity for the application to anticipate that change and inform the operating system to respond appropriately. By preventing the system from transitioning to sleep mode, the application provides a better user experience.

There is no generalized list of tasks for handling system sleep/wake power transitions; they vary between applications. Some tasks for developers to consider include the following:

  • Saving state/data prior to the sleep transition and restoring state/data after the wake transition.
  • Closing all open system resource handles such as files and I/O devices prior to the sleep transition.
  • Disconnecting all communication links prior to the sleep transition and reestablishing all communication links after the wake transition.

 

This item is part of a series that is introduced in the item
How to Mobilize Software Applications


Source

Discovering Mobilized Software