Handling IRPs: Definition 2: IRP as a Thread-Independent Call Stack
来源:互联网 发布:nodejs高级编程 中文 编辑:程序博客网 时间:2024/06/08 03:58
Definition 2: IRP as a Thread-Independent Call Stack
Performing an I/O operation typically requires more than one driver for a device. Each driver for a device creates a device object, and these device objects are organized hierarchically into adevice stack. IRPs are passed down the device stack from one driver to the next. For each driver in the stack, the IRP contains a pointer to an I/O stack location. Because the drivers can handle the requests asynchronously, an IRP is similar to a thread-independent call stack, as Figure 2 shows.
Figure 2. IRP as Thread-independent Call Stack
On the left side of Figure 2, the thread stack shows how the parameters and return address for drivers A, B, and C might be organized into a call stack. On the right, the figure shows how these parameters and return addresses correspond to the I/O stack locations and IoCompletion routines in an IRP.
The asynchronous nature of IRP handling is critical to the operating system and the Windows Driver Model (WDM). In a synchronous, single-threaded I/O design, the application that issues a request and each driver through which the request passes must wait until all lower components have completed the request. Such a design uses system resources inefficiently, thus decreasing system performance.
The structure of the IRP provides for an inherently asynchronous design, enabling applications to queue one or more I/O requests without waiting. While the I/O request is in progress, the application thread is free to perform calculations or queue additional I/O requests. Because all the information required to process the request is encapsulated in the IRP, the requesting thread’s call stack can be decoupled from the I/O request.- Handling IRPs: Definition 2: IRP as a Thread-Independent Call Stack
- Handling IRPs: Definition 1: IRP as a Container for an I/O Request
- Handling IRPs 4: Completing an IRP
- handling IRPs 17: Call to Action and Resources
- handling IRPs 15: Building IRPs
- Handling IRPs 3: Passing an IRP to the Next Lower Driver
- handling IRPs 14: Success, Error, and Warning Status for IRP Completion
- Handling IRPs 11: Life Cycle of a File Object
- Handling IRPs: Introduction
- Handling IRPs 10: Optimizations
- Handling IRPs 9: Summary of Guidelines for Pending IRPs
- IRP Dispatching and Handling
- Different ways of handling IRPs - cheat sheet (part 2 of 2)
- Handling IRPs 5: Synchronous I/O Responses
- Handling IRPs 6: Asynchronous I/O Responses
- Handling IRPs 8: Propagating the Pending Bit
- handling IRPs 12: Data Transfer Mechanisms
- handling IRPs 16: Debugging I/O Problems
- iOS 模拟/仿真翻页效果和(AFKPageFlipper)以及对PDF文档的读取
- 浅说机器学习中“迭代法”
- js中调用AS莫名其妙的错误,不得使用的关键词
- iOS7新特征汇总[04]新特征介绍4
- ArcGIS Server 10.1新特性-- 发布服务
- Handling IRPs: Definition 2: IRP as a Thread-Independent Call Stack
- c#之执行SQL存储过程
- python 抓取腾讯微博数据并做简单的分析
- 数据结构要点归纳总结(转)
- Error: C3065E: type of input file 'XXX' unknown——已解决!
- Handling IRPs 3: Passing an IRP to the Next Lower Driver
- Handling IRPs 4: Completing an IRP
- 开发者所需要知道的iOS7 SDK新特性
- Handling IRPs 5: Synchronous I/O Responses