7.3 Requirements for Using Interlocked Queues or Device Queues

A lowest-level NT driver either must have a StartIo routine or must set up and manage its own internal queue(s) of IRPs. A higher-level NT driver can have its own internal queues of IRPs at the discretion of the driver designer.

Depending on the functionality required and the nature of the underlying device, an NT driver writer might implement a StartIo routine and set up one or more driver-managed supplemental queues for IRPs.

The system provides support for the following kinds of internal queues of IRPs that NT drivers can use:

An interlocked queue is simpler to manage, particularly for drivers with device-dedicated threads or worker-thread callbacks. On the other hand, supplemental device queues give an NT driver more control over whether a given IRP is placed in the queue and over the ordering of entries in the queue.

An NT driver should not use a singly-linked interlocked queue for IRPs.