Chapter 10: Synchronization


Overview

Windows is a preemptive, multitasking operating system in which multiple threads can try to access shared data or resources concurrently and multiple driver functions can run concurrently. To ensure data integrity, drivers must synchronize access to writable shared data. As the driver writer, you must determine which data structures require synchronization and which synchronization technique is appropriate for each situation.

WDF was designed to handle some basic synchronization requirements for the driver. The framework also provides some driver-configurable synchronization techniques. However, most drivers must also use the Windows synchronization primitives. This chapter outlines the general synchronization requirements for drivers and describes the synchronization features that the frameworks provide.

For this chapter, you need

From


Samples

 

Featured Toaster

%wdk%\src\kmdf\toaster\func\featured

Pcidrv

%wdk%\src\kmdf\Pcidrv

Serial

%wdk%\src\Kmdf\Serial

USB Filter

%wdk%\src\umdf\usb\filter

WDK documentation

 

Synchronization Techniques

http://go.microsoft.com/fwlink/?LinkId=80898

Other

 

"Locks, Deadlocks, and Synchronization" on the WHDC Web site

http://go.microsoft.com/fwlink/?LinkId=82717

"Synchronization" on MSDN

http://go.microsoft.com/fwlink/?LinkId=80899




Developing Drivers with the Microsoft Windows Driver Foundation
Developing Drivers with the Windows Driver Foundation (Pro Developer)
ISBN: 0735623740
EAN: 2147483647
Year: 2007
Pages: 224

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net