Multiprocessor Considerations for Kernel-Mode Drivers

Updated: October 31, 2004
**
Download

Multiprocessor Considerations for Kernel-Mode Drivers

DownloadMP_issues.doc
367 KB
Microsoft Word file
Updated: Oct 28, 2004
**

Hyper-threading and future technologies mean that all new machines will eventually support more than one processor. Therefore, every Windows driver must be designed to handle the concurrency and synchronization requirements that multiprocessor systems impose and must be thoroughly tested on both single-processor and multiprocessor systems.

Because the Windows kernel is fully preemptible, writing drivers to run on multiprocessor systems is no different from writing drivers to run on single-processor systems. However, errors in synchronization and locking are more likely to occur on multiprocessor systems because code from a single driver can run simultaneously on more than one processor. A driver that has been tested and debugged on single-processor systems may fail when run on a multiple-processor system because of previously undetected bugs.

To write drivers that operate correctly on all Windows platforms, you should be familiar with the following:

Multiprocessor architectures that Windows supports

Simultaneous thread execution

Reentrancy and concurrency of standard driver routines

Driver synchronization requirements

Performance and scalability issues

Tools for testing on multiprocessor hardware

In addition, Windows Server 2003 includes limited support for cache-coherent non-uniform memory access (ccNUMA) architectures; expanded support is planned for Windows Vista. This paper includes a brief discussion of driver issues for such architectures.

This information applies for the following operating systems:
Microsoft Windows 2000
Microsoft Windows XP
Microsoft Windows Server 2003
Microsoft Windows Vista

Included in this white paper:

Multiprocessor Support in Windows

Simultaneous Thread Execution

Reentrant and Concurrent Routines

Synchronizing Access and Enforcing Program Order

Memory Barriers and Hardware Reordering

Performance and Scalability

Testing

About NUMA Architectures

Best Practices for Drivers


Top of pageTop of page