POWER MANAGEMENT IN WINDOWS-CE (HAND-HELD DEVICES) By: Ankur Agarwal.

26
POWER MANAGEMENT IN WINDOWS-CE (HAND-HELD DEVICES) By: Ankur Agarwal

Transcript of POWER MANAGEMENT IN WINDOWS-CE (HAND-HELD DEVICES) By: Ankur Agarwal.

Page 1: POWER MANAGEMENT IN WINDOWS-CE (HAND-HELD DEVICES) By: Ankur Agarwal.

POWER MANAGEMENT IN WINDOWS-CE

(HAND-HELD DEVICES)

By: Ankur Agarwal

Page 2: POWER MANAGEMENT IN WINDOWS-CE (HAND-HELD DEVICES) By: Ankur Agarwal.

MOTIVATION

• Complex Application on Portable System– Images– Gaming– Video Clips

• Reduction in Weight and Size

• Catastrophic Data Loss

Page 3: POWER MANAGEMENT IN WINDOWS-CE (HAND-HELD DEVICES) By: Ankur Agarwal.

POWER MANAGEMENT AT DIFFERENT LEVELS

Transistor LevelArchitecture LevelApplication LevelSystem Level

(Operating System) AB

ST

RA

CT

ION

Page 4: POWER MANAGEMENT IN WINDOWS-CE (HAND-HELD DEVICES) By: Ankur Agarwal.

SYSTEM LEVEL POWER MANAGEMENT

• Power Manager is a Part of System Level Power Management. It manages– Applications– Devices– Processor

• It collects the information from the various interfaces

• Based on the information it puts the whole system into lowest possible power state suitable for a particular application.

Page 5: POWER MANAGEMENT IN WINDOWS-CE (HAND-HELD DEVICES) By: Ankur Agarwal.
Page 6: POWER MANAGEMENT IN WINDOWS-CE (HAND-HELD DEVICES) By: Ankur Agarwal.

POWER MANAGEMENT ARCHITECTURE

APPLICATION LEVELPOWER MANAGER

PM POLICYMANAGER

DEVICE LEVEL POWER MANAGER

APPLICATIONSUBSYSTEM

DEVICEDRIVERS

BATTERY

Page 7: POWER MANAGEMENT IN WINDOWS-CE (HAND-HELD DEVICES) By: Ankur Agarwal.

POWER MANAGEMENT ARCHITECTURE

• Both Application and Device drivers in the system are dependent on the services of the Power Manager.

• The Power Manager provides Applications and Drivers with the necessary means to comprehend system-level changes and adapt their power states accordingly.

• Windows CE .NET has a comprehensive set of Power Management APIs for both device drivers and applications within a Power Manager component.

Page 8: POWER MANAGEMENT IN WINDOWS-CE (HAND-HELD DEVICES) By: Ankur Agarwal.

POWER MANAGEMENT SOFTWARE ARCHITECTURE

• Handles system-wide Power Management policy.

• Manages the system, Device & processor states to minimize the power consumption.

• Provides a set of services for applications in the system to get notifications on the system-level state changes.

• Provides the mean of applications to request specific levels of availability and performance from the system and in certain cases, from the device that the application is dependent on.

Page 9: POWER MANAGEMENT IN WINDOWS-CE (HAND-HELD DEVICES) By: Ankur Agarwal.

POWER MANAGEMENT SOFTWARE ARCHITECTURE

• Provides a set of services for the device drivers in the system to get notifications on the system level state changes & respond to it.

• Provides a means for the drivers to communicate to their power state.

• Monitors critical resources in the system.• Monitors processor utilization and ensures that the

processor is operating at the lowest possible power state.

Page 10: POWER MANAGEMENT IN WINDOWS-CE (HAND-HELD DEVICES) By: Ankur Agarwal.

DEVICE LEVEL POWER MANAGEMENT

CLASS DIAGRAM

POWER MANAGER DEVICE NOTIFIER

+REQUESTPOWERNOTIFICATION ( )+STOPPOWERNOTIFICATION ( )+UPDATEDEVICEPOWERSTATE ( )

PM NOTIFICATION INTERFACE

DEVICE DRIVER OR PROXY

+GETDEVICEPOWERCAPABILITIES ( )+GETDEVICEPOWERSTATE ( )+SETDEVICEPOWERSTATE ( )

DRIVER PMINTERFACE

Page 11: POWER MANAGEMENT IN WINDOWS-CE (HAND-HELD DEVICES) By: Ankur Agarwal.

PM NOTIFICATION INTERFACE

POWER MANAGER DEVICE NOTIFIER

+REQUESTPOWERNOTIFICATION ( )+STOPPOWERNOTIFICATION ( )+UPDATEDEVICEPOWERSTATE ( )

• Provides the means for Power Manager to notify drivers about various system-level power state changes.

• E.g. : Plugging a new application

Page 12: POWER MANAGEMENT IN WINDOWS-CE (HAND-HELD DEVICES) By: Ankur Agarwal.

DEVICE CONTROL POWER MANAGER

• Provides a means for the Power Manager to get and set specific capabilities at the device driver level.

• Device drivers must support the Power Management States

DEVICE DRIVER OR PROXY

+GET DEVICE POWER CAPABILITIES ( )+GET DEVICE POWER STATE ( )+ SET DEVICE POWER STATE ( )

Page 13: POWER MANAGEMENT IN WINDOWS-CE (HAND-HELD DEVICES) By: Ankur Agarwal.

DEVICE DRIVER INTRACTION WITH POWER MANAGER

PM DEVICENOTIFIER

DEVICEDRIVER

PM POLICYMANAGER

BATTERYDRIVER

RequestPowerNotification ( )

Query System State To Standby ( )

Accept System State Modification( )

Notify System State to LowBatt ( )

Notify System State to Standby ( )

Low Batt Event ( )

SystemOn Event ( )

Notify System State to On ( )

Get Batt Level ( )

Current Batt Level ( )

SEQUENCE DIAGRAM

Page 14: POWER MANAGEMENT IN WINDOWS-CE (HAND-HELD DEVICES) By: Ankur Agarwal.

DEVICE DRIVER INTRACTION WITH POWER MANAGER

• POLICY MANAGER– Monitors the Power State Change request.– Monitors the Battery charge life (Battery

Driver).– Notifies when the battery is low.– In case of critical battery, it shuts down the

whole system.

Page 15: POWER MANAGEMENT IN WINDOWS-CE (HAND-HELD DEVICES) By: Ankur Agarwal.

DEVICE DRIVER INTRACTION WITH POWER MANAGER

• Device drivers register themselves to receive notification from the PM Device Notifier.

• On detecting idle-state for the defined threshold, the Policy Manager sends a Query System State Mod to Standby event (in this example) to the device driver (through the Device Notifier) to check if the device drivers are ready to change the system state to Standby.

• The PM Device Notifier sends a Query System State Mod to all the device drivers registered with it.

• When all device drivers have accepted the Query, the PM Policy Manager puts the system into the new power state.

Page 16: POWER MANAGEMENT IN WINDOWS-CE (HAND-HELD DEVICES) By: Ankur Agarwal.

DEVICE DRIVER PM IN WIN CE.NET

• Handles Power requests sent by power manager.• Inform power manager of the power capabilities

of the device driver and the supported power modes.

• Power-up the device on system startup..• Power down the device when idle.• Changes the device power states as per

requirement.

Page 17: POWER MANAGEMENT IN WINDOWS-CE (HAND-HELD DEVICES) By: Ankur Agarwal.

APPLICATION LEVEL POWER MANAGEMENT

CLASS DIAGRAM

APPLICATION NOTIFICATION MANAGER

+REQUESTPOWERNOTIFICATION ( )+STOPPOWERNOTIFICATION ( )

PM NOTIFICATION INTERFACE

SYSTEM LEVEL APPLICATIONPOWER MANAGER

+GETSYSTEMPOWERSTATE ( )+SETSYSTEMSTATETOON ( )+SETSYSTEMSTATETOON ( )

SYSTEM LEVEL PMINTERFACE

Page 18: POWER MANAGEMENT IN WINDOWS-CE (HAND-HELD DEVICES) By: Ankur Agarwal.

APPLICATION LEVEL POWER MANAGEMENT

CLASS DIAGRAM

DEVICE CONTROL POWER MANAGER

+GETDEVICEPOWERSTATE ( )+SETDEVICEPOWERREQUIREMENT ( )+SETDEVICEPOWERREQUIREMENT ( )

DRIVER LEVEL PMINTERFACE

Page 19: POWER MANAGEMENT IN WINDOWS-CE (HAND-HELD DEVICES) By: Ankur Agarwal.

APPLICATION NOTIFICATION MANAGER

• The Application Notification Manager provides the means for the Power Manager to notify applications about various system-level Power state changes required.

APPLICATION NOTIFICATION MANAGER

+REQUESTPOWERNOTIFICATION ( )+STOPPOWERNOTIFICATION ( )

PM NOTIFICATION INTERFACE

Page 20: POWER MANAGEMENT IN WINDOWS-CE (HAND-HELD DEVICES) By: Ankur Agarwal.

SYSTEM LEVEL APPLICATIONPOWER MANAGER

• The System-level Application PM is used to get and set system-level power states. It is also the means to get the current Battery state.

SYSTEM LEVEL APPLICATIONPOWER MANAGER

+GETSYSTEMPOWERSTATE ( )+SETSYSTEMSTATETOON ( )+SETSYSTEMSTATETOON ( )

SYSTEM LEVEL PMINTERFACE

Page 21: POWER MANAGEMENT IN WINDOWS-CE (HAND-HELD DEVICES) By: Ankur Agarwal.

DEVICE CONTROL POWER MANAGER

• The Device Control PM provides a means for applications to set specific guidelines for devices that Applications can request to set the system power level. Applications can request the Power Manager to alter a device's power state transition.

DEVICE CONTROL POWER MANAGER

+GETDEVICEPOWERSTATE ( )+SETDEVICEPOWERREQUIREMENT ( )+SETDEVICEPOWERREQUIREMENT ( )

DRIVER LEVEL PMINTERFACE

Page 22: POWER MANAGEMENT IN WINDOWS-CE (HAND-HELD DEVICES) By: Ankur Agarwal.

APPLICATION INTRACTION WITH ANM

ApplicationApplicationNotificationManager

PM PolicyManager

Battery Driver

Request Power Notification ( )

Query System State to Standby( )

Accept System State Modification()

Notify System State to Low Batt ( )

Notify System State to Standby ( )

Notify System State to On ( )

Stop Power Notification ( )

Low Batt Event ( )

System On Event ( )

Get Batt Level ( )

Current Batt Level ( )

Page 23: POWER MANAGEMENT IN WINDOWS-CE (HAND-HELD DEVICES) By: Ankur Agarwal.

APPLICATION INTRACTION WITH ANM

• POLICY MANAGER– Monitors the Power State Change request.– Monitors the Battery charge life (Battery

Driver).– Notifies when the battery is low.– In case of critical battery, it shuts down the

whole system.

Page 24: POWER MANAGEMENT IN WINDOWS-CE (HAND-HELD DEVICES) By: Ankur Agarwal.

APPLICATION LEVEL POWER MANAGER SERVICES

• The Applications register themselves to receive notification from the App Notification Manager.

• On detecting idle-state for the defined threshold, the Policy Manager sends a Query Standby event to the Application.

• The Application Manager sends a Query System State Mod to all the applications registered with it.

• When all applications have accepted the Query, the App Notification Manager notifies the PM.

• Policy Manager which then puts the system into Standby state.

Page 25: POWER MANAGEMENT IN WINDOWS-CE (HAND-HELD DEVICES) By: Ankur Agarwal.

ApplicationDevice Control

PMPM PolicyManager

Device Driver

Get Device Power State ( )

Set Device Power Requirement ( )

Acknowledge ( )

ReleaseDevicePowerRequirement()

Acknowledge ( )

Set Device Power State ( )

Device Power State ( )

Set Device PowerRequirement( )

Acknowledge ( )

Set Device Power State ( )RlsDevicePowerRequirement( )

Acknowledge ( )

Page 26: POWER MANAGEMENT IN WINDOWS-CE (HAND-HELD DEVICES) By: Ankur Agarwal.

APPLICATION LEVEL POWER MANAGER SERVICES

• Set Device Power Requirement• Release Device Power Requirement• Acknowledge• Set Device Power State• Get Device Power State• Device Power State