Power Management Architecture

The Power Manager allows you to manage devices simply and independent of the base Microsoft® Windows® CE power management model. The Power Manager interface provides flexibility to OEMs and device driver developers without sacrificing compatibility with the base model. In the base Windows CE power model, devices receive notification that the OS is suspending and resuming. This notification occurs in an interrupt context, so devices are severely restricted regarding what they can do during a suspend state and how long they can take to do it.

Using the Power Manager, devices receive power state change notifications as I/O control codes (IOCTLs). Because IOCTLs execute in a thread context, driver developers have much more flexibility in how they implement the power state change. Using IOCTLs to manage power also enables separation of device power state from overall OS power state. Thus, some devices can be turned off while the OS is running, and others can be left on while most of the OS is suspended.

In addition to managing device power, the Power Manager notifies applications about power-related events. For example, Power Manager informs interested applications when the OS resumes from a suspend state.

The Power Manager is implemented as a dynamic-link library (DLL), called Pm.dll, which is linked directly with Device.exe. Device.exe invokes entry points in Pm.dll when power management application programming interfaces (APIs) are invoked. The source for Pm.dll is provided with Microsoft Platform Builder version 4.0 and later, and OEMs may customize it for their platform.

The Power Manager acts as a mediator between devices, applications, and defined OS power states. It implements the following set of rules to communicate between those three parts:

  • OS power states impose maximum power consumption limits on all devices.
  • Applications impose minimum power consumption limits on specific devices to obtain minimum performance levels.
  • The Power Manager will allow devices to intelligently manage their own power as long as they keep their power levels between the maximum and minimum limits.
  • If the minimum power consumption limit is set higher than the maximum, the power of the device will remain elevated for as long as the application requires the device.
  • If the OS transitions to a suspend state, application-imposed minimum power limits will be set aside while the OS is in a suspend state.

Within the Power Manager framework, OEMs define OS power states that establish maximum device power states. Devices call DevicePowerNotify to regulate their own power levels and applications call SetPowerRequirement to verify that the devices they need are running at an acceptable performance level.

See Also

Power Manager Requests and NDIS | Suspend and Resume Power Callbacks | Power States | Power Manager Interfaces | System Power State Transitions | Device Power Management Guidelines | Other Power Management APIs | Kernel Power Management

 Last updated on Tuesday, May 18, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.