Virtual Machine Manager

The VMM is a 32-bit protected-mode operating system. Its primary responsibility is to create, run, monitor, and terminate virtual machines. The VMM provides services that manage memory, tasks, interrupts, and protection faults. The VMM works with virtual devices, 32-bit protected-mode dynamic-link libraries, to allow the virtual devices to intercept interrupts and faults in order to control the access an application has to hardware devices and installed software.

Both the VMM and the virtual devices run in a single, 32-bit, flat model address space at privilege level zero (also called ring 0). The system creates two global descriptor table (GDT) selectors, one for code and the other for data, and uses these selectors in the CS, DS, SS, and ES segment registers. Both selectors have a base address of zero and a limit of four gigabytes, so all the segment registers point to the same address space. The VMM and virtual devices never change these registers.

The VMM provides single-threaded, preemptive multitasking. It runs multiple applications simultaneously by sharing CPU time between the virtual machines in which the applications run. The VMM is also nonreentrant. This means virtual devices must synchronize access to the VMM services. The VMM provides services, such as semaphores and events, to help virtual devices prevent re-entering the VMM.

The VMM creates and initializes the system virtual machine when it first starts. Initially, the WIN.COM program loads VMM32.VXD which contains the VMM and the default virtual devices. The VMM, loaded into extended memory allocated using an XMS driver, initializes itself and the virtual devices, and switches to protected-mode execution. When initializing, virtual devices typically install callback procedures for interrupts and faults, and allocate memory for resources associated with the system virtual machine. The virtual shell device (SHELL), typically the last virtual device to be initialized, starts Windows in the system virtual machine by loading the Windows kernel, KRNL386.EXE. The kernel loads all other required pieces of Windows which culminates in the starting of Windows 95 Shell.