Device Drivers accept commands from the operating system and translates them into hardware-specific commands. Adding hardware does not affect the OS. Windows looks to the device driver to translate the data, once the driver is properly installed and registered. Drivers exist for the system components, the keyboard, mouse, communications ports, and other hardware installed on a Wintel system.

There are two types of device drivers.

  • Real-Mode Device Drivers
    Real-mode drivers are made to interface through the DOS environment. The drivers are implemented through .SYS or .DRV files. These files are loaded in the CONFIG.SYS or any Windows .INI file.

  • Protected-Mode Device Drivers
    The protected-mode drivers take advantage of the x86 architecture. They are loaded when needed and unloaded when they are no longer required. These files are loaded as .VXD or .386 files.

    Driver files are normally located in the Windows 95 \windows\system folder. During setup, most drivers are incorporated into the VMM32.VXD file. As new drivers are installed, they are added to the VMM32.VXD. Should protected-mode drivers be found, the system will remark (REM) out the real-mode drivers in the CONFIG.SYS file.

  • Device drivers consist of software which interfaces between hardware and an operating system. They almost always run in kernel mode (or ring 1/2 on x86 architectures).

    Under DOS, device drivers are specially-designed DOS executable files which are loaded via a DEVICE= line in CONFIG.SYS. These are also known as "real mode" drivers, and load at bootup time. It is also possible to load them after bootup.

    Under Windows versions with a 16-bit core (Windows 3.x/95/98/ME), device drivers are provided via VxD files (specially-written DLLs). Under modern Windows versions (Windows NT/2000/XP), device drivers are simply specially-written DLLs, normally loaded via the HAL.

    All Windows versions since Windows 3.x have used INF files, special forms of INI files, to assist with driver installation. All Windows versions since Windows 98 (98/ME/2000/XP) support device drivers written using the WDM, which are similar to NT-style drivers but are written using a limited set of kernel functions which are also available on Windows 98/ME.

    Windows CE is a special case: it has a different device driver system, still based on specially-written DLLs. Windows CE device drivers can be either of two types of driver: 'normal' drivers and 'stream interface' drivers. Core drivers (such as display drivers) are loaded at bootup, while other drivers are loaded on demand by the Device Manager.

    Under Linux, device drivers are written as part of the kernel, either actually compiled into the kernel itself or provided as a loadable module. The normal interface provided by device drivers is a block device. Loadable modules can be loaded either at bootup or on demand.

    XFree86 has its own device driver system for display hardware, using dynamically loadable libraries.

    Under Mac OS X, device drivers are provided via the I/O Kit. 'hub' drivers provide interfaces to the buses (eg USB, PCI, Firewire), and 'normal' drivers, which access the hardware via these interfaces, are loaded as required by the I/O Kit.

    AtheOS device drivers are currently loaded during bus enumeration at bootup, and can either interface via BeOS-style "kits" (such as the appserver) or UNIX-style block devices.

    BeOS device drivers can take three forms: regular UNIX-style drivers providing block devices, SCSI controller drivers conforming to CAM (SIMs), and graphics card 'drivers' (which are basically addons to the appserver). They are in the form of add-on modules, and are loaded at boot time.

    BSD device drivers are similar to Linux ones: they are all 'kernel modules'.

    Device drivers normally need to be rewritten when ported between platforms, and open source operating system drivers are almost always written by volunteers. However there are tools such as WinDriver/KernelDriver which allow device drivers to be written for multiple platforms at once.

    Log in or registerto write something here or to contact authors.