A virtual device is a 32-bit dynamic-link library (DLL) that manages a system resource, such as a hardware device or installed software, so that more than one application can use the resource at the same time. 386 enhanced-mode Windows uses virtual devices to allow multitasking for non-Windows applications. The virtual devices work in conjunction with Windows to process interrupts, and carry out I/O operations for a given application without disrupting the execution of other applications.
Most virtual devices manage a hardware device, and many also manage corresponding software such as ROM BIOS routines. A virtual device can contain the device-specific code needed to carry out actions on the device, or it can rely on the corresponding ROM BIOS or other software to carry out these operations. In all cases, the virtual device keeps track of the state of the device for each application, and ensures that the device is in the correct state whenever an application continues execution.
Some virtual devices manage only installed software, such as an MS-DOS device driver or a TSR program. Such virtual devices often contain code that either emulates the software or ensures that the software uses data that applies only to the currently running application. Virtual devices are sometimes used to improve the performance of installed software; the 80386 and compatible microprocessors can execute the 32-bit code of a virtual device more efficiently than the 16-bit code of an MS-DOS device driver or TSR.