Synchronization Techniques for KMDF Drivers

Synchronizing kernel-mode driver operations is one of the most challenging tasks that a driver writer must accomplish. If every driver handled only one device on a uniprocessor system, if each device handled one synchronous I/O operation at a time, and if the system did not allow several devices to share interrupt vectors, there would be no synchronization issues. Writing drivers would be relatively easy.

However, a typical device driver might have to support multiple devices on a system, each generating asynchronous I/O operations; multiple processors that can run driver threads in parallel, sometimes at multiple IRQL levels; multiple devices of different types that share a single interrupt vector; and multiple applications that share access to each device.

Kernel-Mode Driver Framework provides synchronization capabilities that simplify the synchronization tasks that drivers must handle. The following topics describe mechanisms that Kernel-Mode Driver Framework provides to help you synchronize driver operations:

Using Automatic Synchronization

Using Framework Locks

 

 

Send comments about this topic to Microsoft

Build date: 4/23/2013

Show:
© 2015 Microsoft