Understanding the VxD Architecture in Windows 95
The Virtual Device Driver (VxD) layer served as the backbone of the Windows 95 hybrid architecture, providing essential hardware virtualization, system stability, and operating system services. Running at the highest processor privilege level (Ring 0), VxDs bridged the gap between legacy 16-bit MS-DOS environments and modern 32-bit preemptive multitasking. This article examines the critical responsibilities of VxDs in Windows 95, how they interacted with the Virtual Machine Manager (VMM), and why they were vital for backwards compatibility and system performance.
The Role of Ring 0 Privilege
Windows 95 relied on the x86 processor protection rings to manage security and stability. User applications (both 16-bit Windows 3.1 binaries and 32-bit Win32 programs) operated in Ring 3, isolated from direct system control. VxDs operated entirely within Ring 0, the CPU's supervisor mode.
Because they possessed unrestricted access to system memory and processor instructions, VxDs were responsible for low-level tasks that standard Ring 3 programs could not perform safely. This included servicing hardware interrupts, controlling direct memory access (DMA) channels, and managing physical peripheral interfaces.
The Virtual Machine Manager (VMM) and Core Components
At the center of the Windows 95 kernel was VMM32.VXD,
the Virtual Machine Manager. The VMM was not an independent operating
system binary in the traditional sense; rather, it was a monolithic
collection of compiled VxDs that initialized during boot.
The VMM created and maintained multiple Virtual Machines (VMs):
- The System VM: Hosted the 32-bit Win32 subsystem, the 16-bit Win16 subsystem, the graphical user interface (USER and GDI), and the Windows Explorer shell.
- MS-DOS VMs: Isolated environments created dynamically whenever a user launched a command prompt or legacy DOS executable.
Within this framework, specialized VxDs handled foundational
subsystems. For example, VPICD virtualized the Programmable
Interrupt Controller, VDD virtualized display adapters, and
VWIN32 managed thread scheduling and synchronization
primitives for the Win32 API.
Hardware Virtualization and Legacy Compatibility
A major challenge for Windows 95 was maintaining compatibility with MS-DOS programs that assumed exclusive ownership of hardware. Legacy software frequently attempted to write directly to video memory, sound cards, and I/O ports.
VxDs resolved resource contention through hardware virtualization:
- I/O Trapping: When an application attempted to read or write to an I/O port, the CPU trapped the instruction and transferred control to the corresponding Ring 0 VxD.
- State Emulation: The VxD evaluated the request. If an MS-DOS prompt running in a background window attempted to alter display registers, the VxD tracked the changes in a virtual buffer without disrupting the foreground Windows desktop.
- Arbitration: When multiple environments demanded the same physical device—such as a serial port or sound synthesizer—VxDs queued requests or assigned virtualized instances to prevent system deadlocks.
File Systems and Network Stacks
Beyond peripheral virtualization, Windows 95 implemented major operating system subsystems as VxD modules.
The 32-bit protected-mode file system was driven by
IFSMGR.VXD (Installable File System Manager), which
coordinated file access requests and routed them to specific drivers
like VFAT.VXD (Virtual FAT driver). This eliminated the
need to drop into 16-bit real-mode DOS interrupts for disk access,
substantially increasing file transfer throughput and enabling long file
name (LFN) support. Similarly, network protocols (such as TCP/IP and
NetBEUI) and network interface card drivers operated as VxDs to provide
fast, protected-mode networking.
Performance Versus Stability
The architectural decision to rely heavily on VxDs provided Windows 95 with unmatched speed and broad hardware compatibility on modest consumer hardware. Because VxDs ran with flat memory addressing and minimal privilege-checking overhead, drivers executed with near-native performance.
However, this design introduced significant stability risks. Any unhandled exception or memory corruption within a VxD occurred directly inside Ring 0, which inevitably resulted in an operating system halt—commonly manifested as the "Blue Screen of Death" (BSOD). This fundamental vulnerability ultimately led Microsoft to phase out the VxD model in consumer Windows with the release of Windows XP, replacing it permanently with the more structured and secure Windows Driver Model (WDM) established by the Windows NT kernel.