Layered and Monolithic Drivers (Compact 2013)


A device driver can be implemented as a layered driver or a monolithic driver. Layered drivers, also known as MDD/PDD drivers, split interface and hardware-specific functionality into two separate components: a model device driver (MDD) layer that contains the interface to the operating system and applications, and a platform device driver (PDD) layer that communicates with the underlying hardware.

Typically, each layer is packaged in a separate DLL. Monolithic drivers, on the other hand, contain all device driver functionality in a single DLL. The following figure illustrates how these components interface the operating system to device hardware.

Layered and Monolithic Device Drivers

The OS accesses each device driver type through a common device driver interface (DDI) so that layered drivers and monolithic drivers can be used interchangeably, without the OS having to know what type of architecture the device driver uses. The layered architecture defines an additional interface between the PDD and MDD layers, while the monolithic device driver architecture defines no explicit interface between its upper interface and the lower hardware-specific code.

Each device driver architecture type offers distinct advantages. Monolithic drivers offer performance and resource-savings advantages while layered drivers offer advantages with regard to development costs, code reuse, and ease of updating. The layered device driver model simplifies the development and the process of porting device drivers. In the layered model, the developer only has to implement the PDD layer, reusing a common MDD layer that is already implemented for that class of hardware. For each device type that supports this layered architecture, Windows Embedded Compact includes an MDD implementation together with an implemented device driver for that device class. Many of the provided sample drivers use this layered organization because it reduces the amount of code that developers must write when porting the sample drivers to new devices.

In This Section

  • Layered Drivers
    Describes the characteristics of layered drivers, and discusses when you might want to use the layered driver model.
  • Monolithic Drivers
    Describes the characteristics of monolithic drivers, and discusses when you might want to use the monolithic driver architecture.

See Also


Device Driver Types