Summary

OS/2 Version 2.0 provides device drivers to handle the interface between the operating system and the hardware. Physical device drivers are used by normal protected mode processes running OS/2 applications, while virtual device drivers are used by DOS applications running in virtual DOS machines.

Virtual device drivers provide a means of representing hardware devices to a DOS application in a virtual DOS machine, such that the devices appear to the application as though the application had sole control over the device. In this way, MVDM allows DOS applications to issue instructions which directly manipulate hardware devices or the DOS system environment, while maintaining full protection of other applications in the system. Virtual device drivers typically access hardware by requesting services from physical device drivers.

Virtual device drivers are used not only for shared hardware devices, but also for other aspects of the machine environment, such as BIOS, CMOS, and the (physical) programmable interrupt controller. Through the use of virtual device drivers for these components, DOS applications may freely access and manipulate them without affecting other DOS applications or OS/2 applications in the system.

OS/2 Version 2.0 provides a number of standard virtual device drivers for the DOS system environment and common hardware devices. Hardware vendors may develop virtual device drivers for their own hardware adapters. Note that if a hardware device will be dedicated to one application (that is, sharing of the hardware is not required) then a virtual device driver is not needed; the normal DOS device driver will allow the application to access the hardware device as in a native DOS environment.

A virtual device driver operates at privilege level 0, and therefore cannot access operating system services via the normal application programming interfaces provided by OS/2 Version 2.0. Instead, a set of virtual device helper services is provided to enable virtual device drivers to access system services. Virtual device drivers may be written in a high-level language such as "C".


[Back: Abnormal Termination]
[Next: Memory Extender Support]