Handling PnP Paging Request
The following explains why the DO_POWER_PAGABLE bit must be set on the way down and not on the way up:
The power requirements state that if any lower device object sets the DO_POWER_PAGABLE bit, all higher-level drivers must do the same. If the filter
driver fails to set the DO_POWER_PAGABLE bit prior to sending the paging request IRP down the stack, it could violate this condition as follows:Suppose the filter driver does not set the DO_POWER_PAGABLE bit in its Filter DO before forwarding the paging request IRP to the drivers beneath it
in the driver stack. Next suppose that a lower driver sets the DO_POWER_PAGABLE bit in its own DO. Finally, suppose that prior to the completion
of the IRP by the filter driver a power IRP occurs. At that point, the DO_POWER_PAGABLE bit would be cleared in the Filter DO but would be set in
the DO of the lower-level driver, causing a system crash.It is safe to set the DO_POWER_PAGABLE bit before forwarding a paging request down the stack, because there is no longer an active paging file on
the filter driver's device, and therefore no more paging I/O will occur on it. If the request to remove this paging file succeeds, the filter driver will be done. If the request fails, the filter driver can restore the original state of its flags by simply
clearing the DO_POWER_PAGABLE bit prior to completing the IRP. Because the paging file requests are serialized, there is no danger that some other
thread will have modified this bit since the filter driver last altered it.译文为:电源管理的需求规定了假设一个更低层的设备对象设置了 DO_POWER_PAGABLE 位。那么全部的更高层驱动也必须这么做。假设过滤驱动没有在下发分页的 IRP 之前设置 DO_POWER_PAGABLE
位,它可能违反以下的这些条件:如果过滤驱动没有在下发分页 IRP 之前设置 DO_POWER_PAGABLE 位, 再如果下层驱动设置了自己的设备对象的 DO_POWER_PAGABLE 位。最后,如果在这个过滤驱动的 IRP 完毕之前。一个电源 IRP 发生了。这个时候,DO_POWER_PAGABLE
位将被该过滤驱动清除,但它又被更低层的驱动设置了。就引起了一个系统崩溃。
在一个分页请求下发之前设置 DO_POWER_PAGABLE 位是安全的。由于这里不再有一个活跃的分页文件在这个过滤驱动的设备上,因此也不会有分页 I/O 在上面发生。假设移除这个页面文件的请求成功运行,过滤驱动将会去做,假设请求失败,过滤驱动可以恢复它的标志的原始状态,仅仅须要在完毕这个 IRP
之前简单地清除一下 DO_POWER_PAGABLE 位就可以。由于页面文件请求是序列化的。即使其他线程在过滤驱动最后改变它之后又改动了这个位,这也是没有危急的。
原文链接: http://msdn.microsoft.com/zh-cn/ff554992
Handling PnP Paging Request的更多相关文章
- Unable to handle kernel paging request at virtual address
1.Unable to handle kernel paging request at virtual address 00000000 =====>越出内核地址空间范围,原因是由于使用空NUL ...
- An error occured while handling a json request
修复方法: sudo pip install werkzeug==0.8.3
- spring mvc DispatcherServlet详解之二---request通过Controller获取ModelAndView过程
整个spring mvc的架构如下图所示: 上篇文件讲解了DispatcherServlet通过request获取控制器Controller的过程,现在来讲解DispatcherServletDisp ...
- System Error Codes
很明显,以下的文字来自微软MSDN 链接http://msdn.microsoft.com/en-us/library/windows/desktop/ms681382(v=vs.85).aspx M ...
- mm/memory
/* * linux/mm/memory.c * * Copyright (C) 1991, 1992 Linus Torvalds */ /* * demand-loading started ...
- ExtJS远程数据-本地分页
背景 一般情况下,分页展示是前端只负责展示,后台通过SQL语句实现分页查询.当总数据量在千条以下,适合一次性查询出符合条件的所有数据,让前端页面负责分页也是一种选择. 实例 现通过ExtJS 4扩展类 ...
- Windows 错误代码
Error Messages for Windows http://www.gregorybraun.com/MSWINERR.ZIP Server 4.0 Error Messages Code ...
- [转]Delphi I/O Errors
The following are the Windows API (and former DOS) IO errors, which are also the IO errors often ret ...
- [转]ASP.NET web API 2 OData enhancements
本文转自:https://www.pluralsight.com/blog/tutorials/asp-net-web-api-2-odata-enhancements Along with the ...
随机推荐
- leetcode264 Ugly Number II
思路: 新生成的数字一定是原来的某个数字乘以2.3或5,为了得到最小的一个,需要用三个指针记录原数字的位置以供比较.为了避免重复,生成新数字以后,原数字对应的指针需要后移一下. 实现: class S ...
- 第3章 DOM
1.节点,dom有3种节点,元素节点,文本节点,属性节点 2.元素节点是dom的原子,所有的属性节点和文本节点都被元素包含,但并不是所有的元素都包含他们 3.继承,节点树上的元素将继承父元素的样式和属 ...
- js数组的各种方法
1.检测数组 ①Instanceof: if(value instanceof Array){ } 它假定只有一个全局执行环境,若网页中包含多个框架,则存在多个不同的全局执行环境,则Instanceo ...
- 语音跟踪:信号分解、锁相、鸡尾酒会效应、基于PR的信号分离
NLP中关于语音的部分,其中重要的一点是语音信号从背景噪音中分离.比如在一个办公室场景中,有白天的底噪-类似于白噪音的噪音.空调的声音.键盘的啪啪声.左手边45度7米元的地方同事讨论的声音.右手边1. ...
- C++11:using 的各种作用
C++11中using关键字的主要作用是:为一个模板库定义一个别名. 文章链接:派生类中使用using别名改变基类成员的访问权限 一.<Effective Modern C++>里有比较 ...
- [转]最值得拥有的免费Bootstrap后台管理模板
在PHP开发项目中,后台管理因为面向群体相对比较固定,大部分以实现业务逻辑和功能.使用Bootstrap后台模板可以让后端开发很轻松的就展现给客户一个响应式的后台,节约前端开发的时间.下面PHP程序员 ...
- 15Microsoft SQL Server 数据库维护
Microsoft SQL Server 数据库维护 2.6.1数据库联机与脱机 --联机:该状态为数据库正常状态,也就是我们常看到的数据库的状态,该状态下的数据库处于可操作状态,可以对数据库进行任何 ...
- HEVC-HM16.9源码学习(1)TEncCu::xCompressCU
函数入口:Void TEncSlice::compressSlice的m_pcCuEncoder->compressCtu( pCtu );调用xCompressCU( m_ppcBestCU[ ...
- CentOS 6磁盘管理
1.添加4块8G硬盘, 注:要先添加SCSI控制器,再添加SCSI硬盘 2.查看添加的硬盘 3.fdisk分区交互式命令 d delete a partition——————//删除一个分区 n ad ...
- linux cut-连接文件并打印到标准输出设备上
博主推荐:获取更多 linux文件内容查看命令 收藏:linux命令大全 cut命令用来显示行中的指定部分,删除文件中指定字段.cut经常用来显示文件的内容,类似于下的type命令. 说明:该命令有两 ...