IO Manager and Device Driver

1,

Driver Objects:It describes where a driver is loaded in physical memory,the driver's size,and its main entry points.

Device Objects:It resprents a physical or logical device that can be the target of an I/O operation.


2,The NT I/O Subsystem Is Asynchronous,



3, IRP(I/O request packet)

Windows NT describes I/O requests by using a packet-based architecture which is called IRP。

When an IO system service is issued(such as a request to creat or read from a file),the IO Manager services that request by building an IRP describing the request,and then passes a  pointer to that IRP to a device to begin processing therequest. An IRP contains all the information necessary to fully describe an IO request to the IO
Manger and device drivers.
Each IRP may be thought of as having two parts:A fixed part and an IO stack,The fixed part of the IRP contains information about the request that either does not vary from driver to driver,or it does not need to be preserved when IRP is passed from one driver to another.The IO stack contains a set of IO stack locations,each of which holds information specific to each driver that may handle the request.

For example:If an IO request were issued to write a file on a floppy disk,the stack of two drivers that would process this request would probably be File System Driver and
Floppy Disk Driver.



4,Windows NT provides driver writers with the following three different options for describing the requestor's data buffer associated with an IO operation
Direct I/O:The buffer may be described in its original location in the requestor's physical adress space by a structer called MDL
Buffer I/O:The data from the requestor's buffer may be copied from the requestor's address space into an intermediate location in system address space.
Neither I/O:The driver is provided with the requestor's virtual address of the buffer.


5,Understanding MDLs

A Memory Descriptor List(MDL) is capable of describing a signle data buffer that is contiguous in virtual memory but it is not necessarily physically contiguous.


6,Devices utilize different mechanisms to move data between the device and host memory.
Programmed I/O Devices:The driver for a PIO device is responsible for moving data between host memory and the device under,To get data to the device or retrieve data from the device,the driver  is required to manually move the data under program control.This data moviment consumes CPU cycles.
Busmaster DMA Devices:A busmaster DMA device autonomously transfers data between itself and host memory.
System DMA Devices:System DMA do not support scatter/gather

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值