How Programmed I/O Works

This section describes the events that occur during a programmed I/O operation as well as the actions that a driver must take in response to these events.

What Happens During Programmed I/O

In a programmed I/O operation, the CPU transfers each unit of data to or from the device in response to an interrupt. The following sequence of events occurs.

  1. An IRP request (typically an IRP_MJ_READ or IRP_MJ_WRITE) determines that device interaction is required to complete the request. The Dispatch routine queues the IRP for eventual delivery to the driver's Start I/O routine.

  2. The Start I/O routine performs any necessary preprocessing and setup based on the IRP's function code. It then starts the device, typically by writing or ...

Get Windows® 2000 Device Driver Book: A Guide for Programmers, Second Edition, The now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.