Power Management Architecture (Windows CE 5.0)

Send Feedback

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. The following illustration describes the power management architecture for Windows CE.

Aa447556.power_management_architecture(en-us,MSDN.10).gif

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 4.0 and later, and OEMs may customize it for their Windows CE-based device.

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.
  • Devices can implement one or more device power states. Device power states are limited in number. For more information, see Device Power States.
  • 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.
  • System power states describe a maximum device power state for all devices. System power states are defined by the OEM, are described in the registry, and may optionally have code to support them in the Power Manager. The OEM may define any number of system power states. For more information, see System Power States.

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 Management | Power Manager and ACPI/APM | Suspend and Resume Power Callbacks | Other Power Management APIs | Device Power States | System Power States | DevicePowerNotify | SetPowerRequirement

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.