WindowsVistaDevelopingPower-AwareApplications幻灯片

上传人:E**** 文档编号:89730543 上传时间:2019-05-31 格式:PPT 页数:49 大小:626KB
返回 下载 相关 举报
WindowsVistaDevelopingPower-AwareApplications幻灯片_第1页
第1页 / 共49页
WindowsVistaDevelopingPower-AwareApplications幻灯片_第2页
第2页 / 共49页
WindowsVistaDevelopingPower-AwareApplications幻灯片_第3页
第3页 / 共49页
WindowsVistaDevelopingPower-AwareApplications幻灯片_第4页
第4页 / 共49页
WindowsVistaDevelopingPower-AwareApplications幻灯片_第5页
第5页 / 共49页
点击查看更多>>
资源描述

《WindowsVistaDevelopingPower-AwareApplications幻灯片》由会员分享,可在线阅读,更多相关《WindowsVistaDevelopingPower-AwareApplications幻灯片(49页珍藏版)》请在金锄头文库上搜索。

1、1,Windows Vista: Developing Power-Aware Applications,Pat Stemen FUN319 Program Manager Core Platform Architecture Microsoft Corporation ,Geralyn Miller Program Manager Windows Laptop PC Microsoft Corporation ,2,Agenda,Windows Vista Power Management Goals Power-Aware Applications Handling Sleep Trans

2、itions Power versus Performance Integrating with Windows Power Policy Testing for Power Management,3,Windows Vista Power Management Goals,Simplify the user experience Enhance and extend power management usage models Improve the reliability of sleep transitions Predictable behavior Visibility into po

3、wer management actions Extensive diagnostic tracing Enable maximum energy savings Mobile PC battery life Desktop power consumption,4,Windows Vista Mobile PC Pillars,Smooth Transitions,Eliminate existing pain points,More Places,More time on Windows each day,More Scenarios,New mobile experiences, new

4、value,Fast Startup Power Management Connectivity Synchronization Displays,Natural Input/Output Context Awareness Auxiliary Displays Security Backup & Recovery,Collaboration Digital Ink Mobile Media,5,Power-Aware Applications,To achieve power management goals, applications must be power-aware Designe

5、d and tested for power management Applications must handle sleep transitions seamlessly You can differentiate your application with power management features Handle power management events Scale behavior based on users power preference and state of the machine Integrate with Windows power policy,6,E

6、nabling Maximum PC Energy Savings,Windows Vista will, by default, enable energy-saving features on all PCs Sleep is the default “off” behavior on both desktops and mobiles Desktop systems will have monitor blanking and sleep idle timeouts Aggressive power policy defaults for mobile PCs Windows Vista

7、 addresses the principle power management adoption blockers Removes need to be Administrator to change policy settings Supports Group Policy control of power settings Provides a rich power policy command-line tool Features reliable and deterministic sleep transitions,7,Handling Sleep Transitions Ove

8、rview,Maximizing PC energy savings requires reliable sleep transitions But, failed transitions are the primary sleep adoption blocker Component vetoes are the primary cause Roughly 1/3 of all sleep failures Drivers may veto sleep requests Services may silently fail sleep Some applications display wa

9、rnings, some do not Some may display warnings with the laptop lid closed!,8,Component vetoes lead to great user frustration and distrust of power management System did not do what the user asked Worst case scenario Laptop in a bag fails to sleep, or wakes and fails to return to sleep Battery drains,

10、 system overheats, laptop is unusable when needed, possible data loss Users turn off sleep and use shutdown,Handling Sleep Transitions Overview,9,Handling Sleep Transitions Overview,Investigations show that applications and services abuse the ability to veto Veto instead of develop and test for powe

11、r management Veto to prevent potential network connectivity loss Same component may handle network connectivity well outside of sleep / resume,10,Handling Sleep Transitions Windows Vista changes,Windows Vista will not query user mode components when entering sleep PBT_APMQUERYSUSPEND event will not

12、be sent Windows Vista will continue to notify user mode components when entering sleep PBT_APMSUSPEND event is sent Timeout has been reduced from 20s to 2s Use this event to do limited cleanup before the suspend transition,11,Handling Sleep Transitions Applications,Do not depend on blocking a sleep

13、state transition An event will always be sent when the system resumes from sleep PBT_APMRESUME, PBT_APMRESUMECRITICAL, PBT_APMRESUMEAUTOMATIC Use this event to automatically restart a task that did not complete because of a sleep state transition PBT_APMxxx events are delivered with the WM_POWERBROA

14、DCAST message More information available in the Platform SDK,12,Handling Sleep Transitions Idle to Sleep,Sleep idle timeout Transitions the system to sleep after period of inactivity Reduces power consumption when the PC is not in use User-configurable, but enabled by default in Windows Vista on bot

15、h mobiles and desktops Applications may temporarily disable sleep idle timer to ensure system availability e.g., burning a CD, recording a TV show Only disable the timer if absolutely necessary, users expect the system to idle to sleep,13,Handling Sleep Transitions Idle to Sleep,SetThreadExecutionSt

16、ate API Temporarily disables the sleep idle timer Does not prevent user-initiated sleep transitions Button press, lid switch, Start - Sleep, etc. Usage of SetThreadExecutionState Disable the sleep idle timer,SetThreadExecutionState(ES_SYSTEM_REQUIRED | ES_CONTINUOUS);,Process Task When complete, re-enable the sleep idle timer,SetThreadExecutionState(ES_CONTINUOUS);,If your process is unexpectedly terminated, the power manager will automatically cle

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 高等教育 > 大学课件

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号