Fact-checked by Grok 2 weeks ago

Architecture of Windows 9x

The architecture of Windows 9x encompasses the hybrid 16/32-bit design of Microsoft's consumer-oriented operating systems, including , , and Windows Millennium Edition (ME), which integrated a 32-bit protected-mode with legacy 16-bit components derived from and the enhanced mode of Windows 3.x to provide while introducing modern features like preemptive multitasking for 32-bit applications. At the core of this architecture is the Virtual Machine Manager (VMM), a 32-bit kernel operating in ring 0 that manages virtual machines for MS-DOS sessions and coordinates 32-bit protected-mode execution, replacing the real-mode dependencies of prior systems with virtual device drivers (VxDs) for hardware abstraction and interrupt handling. The system supports three primary subsystems: Win32 for native 32-bit applications sharing a common address space up to 2 GB, Win16 for cooperative multitasking of 16-bit Windows 3.x programs sharing a global heap, and MS-DOS virtual machines for running legacy DOS applications in isolated 8086 emulation mode, enabling seamless coexistence but introducing stability risks due to limited process isolation. Memory management in Windows 9x employs a flat, linear addressing model with paging for , allocating up to 4 GB total (2 GB for user processes and 2 GB for the ), though 16-bit components rely on segmented addressing limited to 64 KB per segment, and the first of lacks full , allowing errant code to crash the entire system. The (IFS) Manager handles 32-bit I/O operations, natively supporting VFAT (with long filenames up to 255 characters) and FAT32 in later versions, alongside a unified for improved performance over 16-bit file access. Networking and device support leverage 32-bit components like the Network Provider Interface (NPI) for protocols such as /IP and IPX/SPX, while automation and mini-port drivers for disks, printers, and enhance integration without overhead. Unlike the fully 32-bit, process-isolated architecture of the parallel line, Windows 9x's hybrid approach prioritized compatibility with existing software and hardware, resulting in shared kernel-mode resources that improved responsiveness for consumer tasks like multimedia and gaming but compromised security and reliability, as a single faulty 16-bit application could destabilize the OS. introduced refinements such as the Windows Driver Model (WDM) compatibility and better USB support, while added system restore features, but the fundamental VMM/VxD structure remained consistent across the series until its discontinuation in favor of the kernel in .

Overview

Hybrid Architecture

Windows 9x operates on a hybrid 16/32-bit architecture that integrates a real-mode MS-DOS core for backward compatibility with legacy applications and hardware, while overlaying a protected-mode 32-bit kernel for enhanced performance and modern features. This design allows the system to boot from a customized MS-DOS environment, which processes initialization files like CONFIG.SYS and AUTOEXEC.BAT before loading the Windows shell via WIN.COM, transitioning to protected mode under the Virtual Machine Manager (VMM). In protected mode, the 32-bit components handle core operations such as memory management and I/O, while the 16-bit real-mode layer persists for DOS compatibility through mechanisms like the Real-Mode Mapper, which translates protected-mode calls to real-mode interrupts for unsupported legacy drivers. The in is monolithic, with all essential services—including file systems, memory allocation, and device I/O—integrated into a single 32-bit protected-mode , in contrast to architectures that isolate components for . This structure, centered on VMM32.VXD, enables dynamic loading of drivers (VxDs) without consuming , but it also means that failures in one subsystem can propagate system-wide due to the unified kernel space. The reliance on extends to providing multiple virtual DOS machines (VMs) for running DOS applications preemptively, while 16-bit Windows applications share a single VM under , where apps must yield control voluntarily to avoid hangs. Key to this hybrid model is the multitasking scheme: preemptive scheduling for 32-bit applications and sessions, allowing the to interrupt and switch tasks for better responsiveness, contrasted with for 16-bit Windows apps to maintain compatibility with existing software. This duality, combined with a shared between user-mode processes and kernel-mode services in , enhances efficiency but contributes to instability, as a faulty 16-bit or 32-bit application can corrupt kernel memory and crash the entire system. evolved directly from the 386 Enhanced Mode of , building on its and protected-mode foundations introduced in 1990, but fully integrating the OS without requiring a separate installation starting with in 1995.

Version Variations

Windows 95, released in 1995, introduced the initial hybrid 32-bit architecture for the consumer Windows line, building on 7.0 as its base while incorporating protected-mode components for improved performance and compatibility. The primary was FAT16 enhanced by VFAT for support, enabling up to 255-character names while maintaining with 8.3 conventions. It featured basic capabilities for automatic hardware detection and configuration, though limited to supported devices without native USB integration, requiring third-party supplements for emerging peripherals. Windows 98, launched in 1998 with the Second Edition following in 1999, evolved the kernel for greater stability and efficiency over its predecessor, incorporating 7.10 as the underlying real-mode foundation. Key architectural advancements included native USB support, allowing seamless plug-and-play connectivity for over 250 devices without reconfiguration or reboots. saw refinements for faster application loading and reduced , alongside the introduction of Windows Driver Model (WDM) drivers to complement existing models, enabling source-compatible development for future hardware like audio and modems. Windows Millennium Edition (ME), released in 2000, retained the Windows 98 kernel but shifted focus toward home multimedia use with consumer-oriented tweaks, such as optimized support for playback, while introducing for automated rollback of system files and registry changes to previous states. However, it regressed in real-mode handling by removing direct access to full mode, crippling boot floppies to prevent conflicts and more aggressively overriding and settings during startup, with changes like PerVMFiles=60 in SYSTEM.INI needed for legacy compatibility. This version also eliminated some 16-bit components to streamline the protected-mode environment, but the result was heightened instability, primarily from unverified third-party drivers incompatible with the updated signing requirements. Across the series, all versions shared an base—7.0 for , 7.10 for , and 8.0 for —providing the real-mode bootstrap while transitioning to , though ME diminished reliance on traditional and processing for faster boots. None offered native support, relying exclusively on FAT16/FAT32 for volumes, which limited sizes and security features compared to enterprise counterparts. ME's adjustments emphasized home entertainment over robustness, omitting enterprise tools like advanced networking or multi-processor support present in parallel lines.

Core Components

Critical System Files

The critical system files in form the foundational elements necessary for , initialization, and core operating system functionality, residing primarily in the of the boot drive and the \Windows\System subdirectory. These files include both binaries and components that enable the 16/32-bit to transition from to while providing interfaces for applications and drivers. IO.SYS serves as the real-mode loader in , responsible for initial hardware initialization and loading the subsequent boot components during system startup. Located in the of the boot drive, it contains default device drivers for basic hardware interfacing and merges with MSDOS.SYS to facilitate the early boot process, ensuring compatibility with DOS-based environments. MSDOS.SYS acts as the DOS kernel configuration file in Windows 9x, functioning as a hidden, read-only text file in the boot drive's root directory that stores boot options and paths. It includes sections such as [Paths], which define locations like the boot drive (HostWinBootDrv), Windows boot directory (WinBootDir), and main Windows directory (WinDir), and [Options], which control behaviors like automatic ScanDisk execution (AutoScan), boot menu display (BootMenu), and GUI loading (BootGUI). This file allows customization of boot delays, safe mode options, and multi-boot configurations without altering traditional DOS files like CONFIG.SYS. VMM32.VXD is the virtual machine manager in , handling protected-mode , event and interrupt processing, and the loading of default virtual device drivers (VxDs) after the real-mode . Situated in the \Windows\System directory, it comprises a compressed archive including the executable Virtual Machine Manager, a real-mode loader, and common static VxDs, serving as the core equivalent that orchestrates multitasking and for 32-bit operations. KERNEL32.DLL provides the primary 32-bit kernel interface for Win32 applications in , exporting entry points for process management, allocation, handling, and primitives. Located in the \Windows\System directory, it supports nearly 2,000 functions across versions (4.0 to 4.90), enabling user-mode programs to interact with the underlying while maintaining compatibility with subsystems. EXPLORER.EXE functions as the default and manager in , launching after the core sequence to render the , manage windows, and handle user interactions. Residing in the \Windows directory, it integrates file management capabilities with the , with versions like 4.0.0.950 in providing the foundational environment for application launching and system tray functionality. GDI32.DLL implements the (GDI) client library in , facilitating graphics rendering and formatted text output for applications on displays and printers by abstracting device drivers. Found in the \Windows\System directory, it enables 32-bit applications to draw bitmaps, lines, and text without direct hardware access, supporting the Win32 API for visual elements in the protected-mode environment. USER32.DLL manages core components in , including windows, dialog boxes, menus, and message handling for interactive applications. Positioned in the \Windows\System directory, it provides the foundational for creating and manipulating graphical elements, ensuring consistent across 32-bit programs while integrating with the . SYSTEM.DAT and USER.DAT serve as the primary registry hives in , storing configuration data as hidden files in the \Windows directory (with USER.DAT potentially relocating to \Windows\Profiles for multi-user setups). SYSTEM.DAT holds hardware-specific and system-wide settings under keys like HKEY_LOCAL_MACHINE and HKEY_CURRENT_CONFIG, including device drivers and resource allocations, while USER.DAT contains user-specific preferences under HKEY_CURRENT_USER, such as desktop customizations and application settings. In , an additional CLASSES.DAT hive extends support for class registrations, but the core pair enables persistent storage for the hybrid architecture.

Configuration and Registry

In Windows 9x, system configuration begins with legacy real-mode files inherited from , which handle initial driver loading and environment setup before the transition to . The file, processed early in the boot sequence by IO.SYS, loads real-mode device drivers (via or DEVICEHIGH statements) and sets parameters such as buffers (BUFFERS), handles (FILES), and stacks (STACKS) for handling. These settings ensure compatibility with DOS applications and hardware, though Windows 95 setup often comments out or removes redundant lines like those for SMARTDRV.SYS to avoid conflicts. Similarly, executes batch commands to define environment variables (via SET), update the PATH, and launch terminate-and-stay-resident (TSR) programs, providing a through . While not strictly required for Windows 9x operation, these files persist for , allowing real-mode DOS access. In Windows Millennium Edition (ME), however, and are largely ignored during normal boot, as the system relies more heavily on components, though they may still influence mode sessions. The core of configuration shifted to the , a hierarchical database that replaced the fragmented INI files of Windows 3.x for storing operating system, hardware, and application settings. This centralized approach improves efficiency by consolidating data previously scattered across multiple text-based files. The registry is stored primarily in two hidden files in the %WINDIR% directory: SYSTEM.DAT, which holds system-wide and hardware configurations, and USER.DAT, which manages user-specific profiles such as preferences and shortcuts. introduces an additional CLASSES.DAT file for file associations and OLE registrations, separating these from the main hives. Access to the registry is provided through REG.DLL, a that enables read/write operations, with the REGEDIT.EXE tool allowing manual editing and export/import in .REG text format for backups. The registry's structure consists of keys, subkeys, and values organized under six root hives, forming a tree-like . HKEY_LOCAL_MACHINE (HKLM), sourced from SYSTEM.DAT, contains profiles, device drivers, and OS settings like installed software under \SOFTWARE. HKEY_CURRENT_USER (HKCU), derived from USER.DAT, stores per-user data such as Control Panel customizations and is an alias for the active profile in HKEY_USERS. Other hives include HKEY_CLASSES_ROOT for file types and associations (merged from HKLM\SOFTWARE\Classes and HKCU\SOFTWARE\Classes), HKEY_USERS for all loaded profiles, HKEY_CURRENT_CONFIG for the active profile (alias to HKLM\CONFIG\Current), and the 9x-specific HKEY_DYN_DATA for dynamic information. Values within keys can be strings, , or DWORDs, supporting complex configurations like enumerated device lists. During the boot process, the registry is initialized as part of the protected-mode transition after the real-mode DOS phase, with VMM32.VXD loading the hives into memory for use in hardware detection and subsystem startup. SYSTEM.DAT and USER.DAT are mounted early in this phase, enabling the configuration manager to apply settings for drivers and resources before the Windows shell launches. Windows 95 creates immediate backups as SYSTEM.DA0 and USER.DA0 on modifications, while Windows 98 and ME employ the Registry Checker (SCANREG.EXE) to validate integrity on boot and maintain up to five compressed backups (RBxxx.CAB) in \WINDOWS\SYSBCKUP. Despite its advancements, the Windows 9x registry has notable limitations, lacking access control lists (ACLs) for securing keys against unauthorized modifications, unlike the NT-line systems. This exposes the registry to risks in multi-user environments, as any process can alter critical data without restrictions. Additionally, its format makes it susceptible to from improper shutdowns, disk errors, or faulty applications, often resulting in failures or system instability that require restoration from backups via SCANREG /RESTORE. Such vulnerabilities contributed to the registry's reputation for fragility in consumer-oriented 9x architectures.

Boot Sequence

BIOS Bootstrap and Initial Load

The boot process of begins with the ROM bootstrap, which initializes the hardware upon power-on. The loads from the FFFF0h and performs the Power On Self-Test () to verify basic hardware functionality, including CPU, memory, and peripheral devices. During this phase, the enumerates hardware components, such as checking for bootable media in the A: drive and, if absent, scanning the hard disk using interrupts for low-level disk access operations like reading sectors. For systems with , additional steps include consulting non-volatile RAM for I/O, IRQ, and configurations, disabling devices, creating a resource map, and re-enabling devices sequentially. This phase assumes an x86 architecture with traditional firmware, as lacks support for , relying instead on legacy 16-bit calls for compatibility with 80386 or later processors. Following hardware initialization, the BIOS reads the (MBR) from sector 0 of the boot disk, a 512-byte structure containing the disk's partition table and bootstrap code. The MBR examines the partition table to identify the active (bootable) partition and transfers control to its Volume Boot Record (VBR), also known as the boot sector, located at the first sector of that partition. The VBR, which includes a (BPB) detailing the layout such as FAT type and sector sizes, uses extensions to access the disk and locate the . It then loads the IO.SYS file—a hidden file in the —into at the lowest available address, marking the transition to the operating system's core loader. Upon loading, IO.SYS initializes a minimal FAT file system driver to enable basic disk reads, supporting FAT16 and later FAT32 structures for accessing subsequent boot files. As part of this initialization, IO.SYS relocates interrupt vectors in the system memory to accommodate DOS extensions, hooking relevant BIOS interrupts like INT 21h for file operations while preserving compatibility with real-mode execution. This step ensures that the DOS core can manage I/O without conflicts from prior BIOS vectors. Once IO.SYS is active, it proceeds to load MSDOS.SYS, after which the familiar "Starting Windows 95..." logo (or equivalent for Windows 98/ME) is displayed on screen, typically for a configurable delay of about 2 seconds unless suppressed. At this point, the initial load phase concludes, handing off to DOS configuration processing.

Real-Mode DOS Initialization

Following the initial loading of core DOS files by the BIOS, the IO.SYS file initializes the real-mode DOS environment in Windows 9x, establishing basic hardware interfaces and preparing the system for configuration. This phase, often referred to as phases 3 and 4 of the boot sequence, involves IO.SYS processing the CONFIG.SYS file to load essential real-mode drivers, such as , which provides (XMS) support for accessing memory beyond 1 MB. Additional drivers like EMM386.EXE may be loaded here to enable expanded memory emulation and upper memory block (UMB) management, optimizing availability for applications. After processing completes, IO.SYS executes , a that initializes terminate-and-stay-resident (TSR) programs and sets environment variables, ensuring a functional before any transition to Windows. The behavior of this real-mode setup is influenced by options in the MSDOS.SYS file; for instance, BootGUI=1 (the default setting) automatically launches the Windows graphical interface upon completion of DOS initialization, while BootGUI=0 allows manual entry at a . Similarly, =1 (default) displays the animated Windows startup during this phase, providing visual feedback, whereas Logo=0 suppresses it. In Windows Millennium Edition (ME), this process is streamlined further: IO.SYS handles initialization directly without processing or files in the standard boot path, reflecting a reduced emphasis on real-mode compatibility to prioritize the integrated Windows . This design ensures that applications can still run in a simulated real-mode context if invoked, maintaining backward for legacy software before the Windows subsystem overlays the .

Protected-Mode Transition

Following the real-mode initialization, the boot process advances to phase 5, where WIN.COM executes to launch the Windows 95 graphical environment and initiate the transition to protected mode. WIN.COM loads the core Virtual Machine Manager (VMM) as VMM32.VXD, a monolithic virtual device driver that combines essential static VxDs into a single file for efficient memory usage and startup speed. This VMM initializes multiple virtual machines (VMs) to support the hybrid architecture: a system VM for Win32 and Win16 applications, and separate VMs for MS-DOS programs to ensure isolation and multitasking compatibility. The mode switch occurs dynamically under VMM control, shifting from to V86 mode for compatibility—emulating the 8086 environment within —and to full 32-bit for the and native components, enabling advanced features like multitasking and . During this transition, protected-mode drivers (VxDs) are loaded from the Registry and SYSTEM.INI's [386enh] section, including base drivers for and subsystems, while real-mode drivers from earlier phases remain active for legacy support. Paging is set up to provide demand-paged with a 4 GB (2 GB private per application), and segment selectors are configured to enforce memory attributes and . To optimize I/O and bypass DOS limitations, IFSHLP.SYS loads as a real-mode helper that bridges to protected-mode file systems by sending INT 21 calls to IFSMGR.VXD, enabling direct 32-bit file access and supporting installable s like VFAT without full DOS mediation. Complementing this, IOS.VXD serves as the I/O Supervisor, managing block device operations, interactions, and protected-mode driver coordination to improve performance and reliability during the transition. These components allow to handle 32-bit I/O natively while maintaining . Critical errors during this protected-mode phase trigger the Blue Screen of Death (BSOD), a diagnostic interface displaying error codes and details—such as "Invalid VxD dynamic link call"—to aid troubleshooting, marking a shift from DOS-style error handling to more robust reporting in the 32-bit .

Windows Subsystem Startup

Following the transition to and the loading of virtual device drivers (s), the boot process enters its final , where the core graphical and subsystems are initialized to establish the . This stage, often referred to as Phase 6, begins with the loading of essential Win16 modules, including krnl386.exe (the 16-bit kernel responsible for Win16 and application handling), gdi.exe (the for rendering), and user.exe (the subsystem for handling window messages and input). These modules operate in Ring 3 , building upon the underlying VMM32.VXD to enable the 16/32-bit execution model. Concurrently, Win32 compatibility layers are loaded to support 32-bit applications, including kernel32.dll (providing and management), gdi32.dll (extending primitives), and user32.dll (for advanced elements). This initialization ensures seamless calls across the hybrid architecture, with 32-bit components thunking to their 16-bit counterparts where necessary. The finalizes the core environment, allowing subsequent applications to interact with the system through standardized interfaces for messaging (via ) and (via GDI). Once the subsystems are active, explorer.exe is launched as the default , as specified in the [boot] section of system.ini (shell=explorer.exe). This executable initializes the , , , and , rendering the familiar and handling user interactions from boot completion onward. Windows 9x supports multi-session capabilities through its architecture, running console () sessions in isolated virtual 8086 (VM86) machines separate from the primary session, which operates in its own protected-mode VM. This allows concurrent execution of DOS-based tasks alongside the Windows environment without interference, leveraging the VMM for scheduling and resource isolation. Boot completion involves finalizing registry hives (loading user-specific profiles if applicable), initializing network components via protocols like NDIS.VXD if configured, and executing startup items from the StartUp folder or RunOnce registry keys. At this point, the system prompts for user logon if multi-user profiles are enabled, transitioning to a fully operational state.

Kernel

Kernel Design and Modules

The Windows 9x kernel employs a monolithic design, where the core operating system components, including the Virtual Machine Manager (VMM), file system drivers, and device management services, execute within a single shared kernel address space without a strict separation between user-mode and kernel-mode operations. This architecture prioritizes backward compatibility with MS-DOS and 16-bit Windows applications, allowing them to run in a cooperative multitasking environment alongside 32-bit components, but it exposes system resources to potential corruption from faulty applications. Key core modules include VMM32.VXD, which serves as the primary virtual machine manager responsible for overseeing execution, memory allocation via DPMI services, and system-wide resource scheduling in the System VM. Complementing this is KRNL386.EXE, the 16-bit executable that provides essential low-level services such as initialization and basic I/O handling, while KERNEL32.DLL acts as the 32-bit interface for Win32 calls, thunking to 16-bit counterparts for . These modules integrate core services like creation, thread management, and dispatching directly into the space, enabling 32-bit applications to run preemptively but serializing access for 16-bit code through shared structures, which can lead to bottlenecks. In contrast to the kernel, the 9x design lacks robust security features, such as isolated address spaces or comprehensive access controls, relying instead on limited ring protections where user applications operate in ring 3 but can still access kernel memory in ring 0, resulting in frequent system-wide crashes from errant code. introduced extensions to KERNEL32.DLL, updating its version to 4.10.0.1998 and increasing its size to support enhanced compatibility and stability, reducing some thunking overhead for better performance in multithreaded 32-bit applications.

Virtual Device Drivers

Virtual device drivers (VxDs) serve as the primary driver model in the Windows 9x architecture, providing and resource management at the level. These 32-bit protected-mode drivers operate in Ring 0 and are loaded by the Virtual Machine Manager (VMM) to virtualize hardware devices, enabling multitasking and compatibility with applications while minimizing usage. VxDs handle critical operations such as interrupt requests (IRQs) and (DMA) channels, arbitrating resources to avoid conflicts and improve system stability compared to real-mode drivers. VxDs are categorized into static and dynamic types based on their loading mechanism. Static VxDs are loaded during system initialization and remain resident in memory throughout the session, ensuring constant availability for essential system functions; for example, PAGEFILE.VXD manages the swapfile and paging operations. Dynamic VxDs, in contrast, are loaded on demand—such as when a device is connected via —and can be unloaded when no longer needed, optimizing memory usage. Representative examples include NDIS.VXD, which implements the Network Driver Interface Specification for protocol support, and CONFIGMG.VXD, which oversees hardware configuration and . Starting with and continuing in , the architecture introduces support for the Windows Driver Model (WDM), particularly for emerging hardware like USB devices, allowing kernel-mode WDM drivers to coexist with VxDs. However, VxDs remain the dominant driver type across for most legacy and core system devices due to their deep integration with the VMM. The lifecycle of a VxD is managed through a series of control messages dispatched by the VMM, ensuring proper initialization, operation, and cleanup. VxDs are developed using the Microsoft Device Driver Kit (DDK), which provides tools, headers, and libraries for assembly and C programming. Key messages include Sys_Critical_Init, the first phase received during system startup with interrupts disabled for minimal, stability-critical processing such as resource allocation; Device_Init for further setup once the system VM is loaded; and Sys_Critical_Exit for termination with interrupts disabled to release resources safely. Dynamic VxDs additionally handle Sys_Dynamic_Device_Init on loading and Sys_Dynamic_Device_Exit on unloading when reference counts reach zero.

Memory Management

Mode Switching and Segmentation

Windows 9x supports three primary processor modes to accommodate its hybrid architecture: real mode for legacy DOS applications, virtual-86 (V86) mode for emulated real-mode execution with added protection, and protected 32-bit mode for the kernel and modern applications. Real mode, inherited from , limits addressing to a 1 MB space using 20-bit addresses formed by segment:offset calculations, restricting it to basic 8086-compatible operations without hardware . V86 mode, enabled by the 80386 and later processors, simulates real mode within a protected-mode environment, allowing multiple DOS sessions to run concurrently while providing paging and isolation through the Virtual Machine Manager (VMM); it maintains the 1 MB limit per but translates addresses via segment:offset combined with paging for compatibility. Protected mode, utilized by the 32-bit and subsystems, expands the address space to 4 GB using 32-bit linear addresses, enabling preemptive multitasking and drivers (VxDs) to operate at ring 0 privilege level. Segmentation in Windows 9x relies on the x86 architecture's selectors and descriptors to manage access, bridging the 16-bit heritage with 32-bit capabilities. In real and V86 modes, employs 16-bit segment registers and offsets to generate 20-bit physical addresses, with each limited to 64 KB and no inherent against overflows. shifts to a mostly flat model, where large 4 GB are defined by (GDT) entries using selectors that index into descriptor tables; these descriptors specify base es, limits (up to 4 GB with extensions), and access attributes like readability and executability. Windows 9x uses shared selectors across processes for , particularly for the Win16 subsystem, but this introduces overhead in as logical addresses (selector:) to linear addresses via the descriptors. Pre-allocated selectors, such as those for video regions (e.g., A000h for 64 KB blocks in the A0000h-F0000h range), facilitate direct access to hardware-mapped areas. Services like _MapFlat and SetSelectorBase allow VxDs to adjust these mappings dynamically, converting between 16:16 segmented and 32-bit flat formats. The VMM orchestrates mode switching through virtual machine (VM) control blocks, which maintain per-VM state including registers, segment descriptors, and page tables. Transitions occur via interrupts, traps, or explicit calls: for instance, a DOS application in V86 mode triggers an interrupt (e.g., INT 21h), which vectors through the interrupt descriptor table (IDT) to ring 0, where the VMM saves the client state, switches to protected mode, and dispatches to the appropriate handler before restoring the VM. Nested execution services like Begin_Nest_Exec and Resume_Exec enable seamless shifts, often using DPMI (DOS Protected Mode Interface) calls via INT 31h for 16-bit to 32-bit transitions in applications. The VMM employs VM handles (stored in EBX) to access control blocks during these operations, ensuring isolation between VMs while virtualizing hardware access. Ring 3 user-mode code switches to ring 0 via VxD service calls (e.g., using INT 20h) or other mechanisms mediated by the VMM, with the VMM handling I/O port and memory protections through the I/O permission bitmap (IOPM) and page fault handlers. Upper memory blocks (UMBs), spanning the 640 KB to 1 MB range, are reserved for drivers and applications to maximize availability, managed initially by and EMM386.EXE during the real-mode boot phase. In , the VMM virtualizes UMB access for V86-mode , allocating pages in this region via services like _PhysToV86Page during VM initialization (e.g., in Sys_Critical_Init); this allows real-mode code to use upper memory without conflicting with protected-mode components. Drivers load into UMBs using allocation functions, but Windows reserves portions for system use, such as video adapters at B0000h, ensuring while preventing fragmentation. Despite these mechanisms, Windows 9x's mode handling exhibits significant limitations due to its legacy and lack of full isolation. The shared linear across modes, particularly the 2-3 GB region for system data and Win16 , allows V86 or real-mode code to corrupt protected-mode structures, as there is no supervisor bit enforcement or strict ring boundaries between user . Segmentation's 64 KB granularity in 16-bit components leads to heap exhaustion in and GDI resources, while mode switches introduce latency from state saves and reflections, potentially delaying interrupts up to 1 ms. The flat model's reliance on software emulation for V86 I/O further compromises stability, as errant apps can crash the entire system without hardware-mediated protection.

Virtual Memory and Paging

The virtual memory subsystem in Windows 9x is primarily managed by the Virtual Machine Manager (VMM), a 32-bit protected-mode kernel component that provides demand-paged to applications and virtual machines. VMM abstracts physical memory limitations by mapping a shared 4 GB linear , with 2 GB for user-mode components and 2 GB for -mode, using standard x86 paging hardware to divide memory into 4 KB pages that are loaded on demand only when accessed, thereby minimizing initial and enabling efficient multitasking across , Win16, and Win32 environments. This demand-paging mechanism relies on the swap file for backing store, where unmodified or "virgin" pages are sourced from zero-initialized memory or shared attachments, while dirty pages are written out to disk during faults handled via Interrupt 0E. Each (VM) maintains its own , consisting of a list of physical pages actively allocated to it from the system's page pool. When physical memory pressure increases, VMM trims these working sets by evicting least-recently-used pages to the standby list—unmodified pages that can be quickly repurposed without disk I/O—or to the modified list for later flushing to the swap file, prioritizing system stability over individual VM performance. This per-VM approach contrasts with fully isolated per-process models, as Win16 and shared regions (e.g., the 2 GB–3 GB ) are globally managed to maintain compatibility. The swap file, named WIN386.SWP in and PAGEFILE.SYS in and later, serves as the primary backing store for paged-out and is dynamically resized by VMM based on commit charge and available disk space, growing in 512 increments (128 pages) when swappable pages exceed capacity and shrinking in the background during idle periods if decommitted space allows. Unlike OS/2's fixed swap partitions, which require pre-allocated dedicated disk space, Windows 9x's file-based swap integrates seamlessly with the (e.g., via IFSMgr APIs) and can expand up to the full available disk volume or a user-configured maximum, though practical limits depend on FAT32 cluster overhead. Access occurs through ring-0 calls with system file handle 0x200, ensuring atomic operations without interfering with user-mode file I/O. Windows 9x employs 32-bit flat addressing within its 4 GB virtual space, officially supporting up to 512 MB of physical in Second Edition to avoid kernel-mode addressing conflicts in the VMM and file , though unofficial patches (e.g., modifying SYSTEM.INI or using third-party extenders) enable utilization of up to 1 GB or more by adjusting limits and allocations. Despite these capabilities, the implementation in lacks advanced features found in the , such as robust section objects for shared -mapped files with semantics and integrated file caching via the memory manager. Additionally, the hybrid 16/32-bit design and reliance on VxDs contribute to external fragmentation, where free physical pages become scattered due to segment-based allocations and uneven VM trimming, potentially leading to allocation failures even with ample total RAM.

I/O and File Systems

Device I/O Handling

In the Windows 9x architecture, the device I/O model relies on virtual device drivers (VxDs) to intercept interrupts in , enabling efficient hardware access while maintaining compatibility with legacy real-mode operations. VxDs, operating at Ring 0, virtualize calls such as for disk services by trapping these interrupts through the Virtual Machine Manager (VMM) and redirecting them to protected-mode handlers, which prevents direct real-mode execution and allows for multi-virtual machine (VM) isolation. This interception occurs via VMM services like Simulate_Real_Mode_Interrupt or ExecVxD_Int, ensuring that applications in V86 mode can invoke routines without compromising system stability. Port I/O operations, performed using the privileged IN and OUT x86 instructions, are restricted to kernel-mode components in Windows 9x to enforce security and virtualization. These instructions require Ring 0 privilege; user-mode applications cannot execute them directly and must instead use Win32 APIs such as CreateFile to request I/O, which routes through VxDs for emulation or direct hardware interaction. VxDs manage port access by installing I/O trap handlers with VMM services like Install_IO_Handler, allowing selective trapping of port ranges (e.g., for serial ports at 0x3F8) while bypassing traps for authorized owners via Disable_Local_Trapping. This model supports both I/O-mapped and memory-mapped devices, with C intrinsics like _inp and _outp available in VxDs for low-level control. Interrupt handling in Windows 9x is orchestrated by the VMM, which sets up the (IDT) to route all hardware and software interrupts to its fault handler, with subsequent chaining to VxD-specific routines. The Virtual Programmable Interrupt Controller Device (VPICD) virtualizes IRQs using services such as VPICD_Virtualize_IRQ, enabling VxDs to register Interrupt Service Routines (ISRs) during initialization for devices like the (IRQ 8). Hardware interrupts are reflected to the appropriate VM or handled directly in the System VM for protected-mode efficiency, with latency minimized to around 1 ms through direct Ring 0 execution; real-mode chaining occurs for legacy handlers via pseudo-IDT mechanisms in V86 mode. VxDs must use pagelocked, non-discardable code for ISRs to ensure reliability. Plug and Play enumeration in is facilitated by the Configuration Manager (CONFIGMG.VXD), which scans hardware during boot or dynamic changes using calls and bus enumerators to identify and register . It creates device nodes via services like those in the PnP manager, supporting runtime reconfiguration by arbitrating resources such as IRQs and ports without manual intervention. This supports compatibility with non- hardware by falling back to static enumeration methods. Legacy DOS I/O support is provided through IFSMGR.VXD, which redirects real-mode DOS and BIOS calls to protected-mode equivalents, maintaining backward compatibility for DOS applications running in VMs. It intercepts interrupts like INT 21h using page fault traps and VMM emulation, then routes I/O requests via Ring 0 services such as IFSMgr_Ring0_FileIO for buffered operations. This redirection isolates DOS I/O from the Windows subsystem, preventing conflicts while allowing seamless integration with 32-bit drivers.

File System Support

Windows 9x operating systems primarily relied on the () family of file systems for storage management. Windows 95 used as its default file system, supporting partitions up to 2 GB with 16-bit cluster addressing and the traditional convention. Starting with the OEM Service Release 2 (OSR2) in 1996, Windows 95 optionally supported , which employed 32-bit cluster entries to enable larger volumes and more efficient space utilization on drives exceeding 2 GB. Windows 98 and Windows Millennium Edition (ME) made the native file system, enhancing compatibility with larger hard drives through updated disk utilities like and , while maintaining with for smaller partitions or legacy setups. The architecture centered on the Manager (IFSMGR.VXD), a ring-0 driver that coordinated 32-bit file system drivers (FSDs) and routed file operations directly in , bypassing the slower interrupt-based methods for better multitasking and performance. IFSMGR.VXD handled local, remote, and character-based FSDs by managing resources, interrupts (such as Int 21h and 2Fh), and services like path parsing and matching, enabling seamless 32-bit file access via in VWIN32. This design allowed third-party file systems to integrate while prioritizing native support, though it required compatibility layers for real-mode applications. IFSMGR also supported other FSDs like CDFS.VXD for optical media and network providers for remote access, enhancing the unified 32-bit I/O model. Supporting components included IFSHLP.SYS, a 32-bit helper that facilitated thunking between 16-bit calls and 32-bit IFS operations, redirecting requests through V86 callbacks to maintain with older drivers and peripherals. provided 32-bit disk caching, using a least-recently-used (LRU) to buffer 4096-byte pages in (configurable up to 204,800 pages or about 800 MB), minimizing physical disk I/O and improving read/write speeds for frequently accessed files. , the protected-mode extension to , enabled support (up to 255 characters per component, with a 260-character total path limit) by storing Unicode-based extended entries alongside 8.3 short name aliases in directory structures, preserving case sensitivity without altering core . Despite these advancements, the architecture had significant limitations, lacking journaling for crash recovery, built-in , or support for advanced features like quotas. FAT16 remained constrained to 2 GB partitions, while FAT32, though theoretically capable of 2 TB volumes, faced practical limits in Windows 98 and ME around 64 GB per partition due to FDISK tool issues on larger drives, with overall drive addressing capped at approximately 137 GB (128 GiB) by 28-bit LBA support. Partitions up to the full limit could be created with workarounds or updates. Windows 9x did not natively support modern formats such as , , or HPFS, relying instead on third-party solutions for read-only access to non-FAT volumes where available.

References

  1. [1]
    None
    Below is a merged summary of the Windows 95 architecture based on all provided segments. To retain all the detailed information in a dense and organized manner, I will use a table format in CSV style for each major component (Kernel, File System, Memory, Subsystems, and 32-bit Features). This approach ensures comprehensive coverage while maintaining clarity and avoiding redundancy. Following the tables, I will include a consolidated list of useful URLs.
  2. [2]
    Under the Hood: Happy 10th Anniversary, Windows | Microsoft Learn
    Windows 9x still uses 64KB heaps, but moves many of the larger items out into an extended 2MB region following the heap. USER and GDI resources for Windows 2000 ...
  3. [3]
    What was the role of MS-DOS in Windows 95? - The Old New Thing
    ### Summary of Windows 9x Architecture Facts
  4. [4]
    [PDF] Introducing Microsoft Windows 95 - Bitsavers.org
    The file system architecture. The file system architecture in Windows 95 is made up of the following components: • Installable File System (IFS) Manager. The ...
  5. [5]
    Windows 95 Architecture Components - Techs Helps
    This chapter describes the key components that make up the Windows 95 architecture beginning with its central information store, the Registry, and proceeding ...Missing: resource kit
  6. [6]
    [PDF] Inside the Windows 95 File System
    ... Windows 95 file system. The standard file systems which ship with Windows 95 include: VFAT, the virtual FAT file system; VREDIR, the Microsoft Networks ...
  7. [7]
    Microsoft Announces Immediate Availability of Windows 98 Second ...
    Jun 10, 1999 · Windows 98 Second Edition extends the existing performance benefits of Windows 98, including faster application loading and faster shut-down, to ...
  8. [8]
    Microsoft Windows 98 to Enable a New Generation of Hardware
    Apr 20, 1998 · “Just as Windows 95 ushered in a new class of easy-to-use software, Windows 98 is enabling an exciting new generation of PC hardware,” said ...
  9. [9]
    WDM Audio Architecture Basic Concepts - Windows - Microsoft Learn
    Dec 14, 2021 · The WDM audio architecture is based on kernel streaming (KS) services and is supported in Microsoft Windows 2000 and later and in Windows Me/98.Missing: 9x | Show results with:9x<|control11|><|separator|>
  10. [10]
    Windows Millennium Edition ("Windows Me") FAQ - ITPro Today
    It is based on the Windows 98 kernel, not the Windows NT/2000 kernel. Don't believe rumors that Windows 2000 and 98 are being "merged" to create Windows Me; ...<|separator|>
  11. [11]
    CONFIG.SYS and AUTOEXEC.BAT - Techs Helps
    CONFIG.SYS and AUTOEXEC.BAT. For Windows 95, both the content and method have changed for handling CONFIG.SYS and AUTOEXEC.BAT during system startup.
  12. [12]
    Overview of FAT, HPFS, and NTFS File Systems - Windows Client
    Jan 15, 2025 · Also, support for the FAT32 file system became available in Windows 98/Windows 95 OSR2 and Windows 2000. FAT overview. FAT is by far the most ...
  13. [13]
    Information and Help with the Io.sys File - Computer Hope
    Aug 31, 2020 · The io.sys file is an MS-DOS and Windows 9x hidden system file used to load the operating system each time the computer boots.
  14. [14]
    The Windows 9x Registry - Hermit.CC
    The System.dat file is always stored as a hidden file on the local computer in the Windows 98 folder. The System.dat file contains hardware-specific or ...Registry Files · Registry Structure · Regedit. Exe
  15. [15]
    Msdos.sys Help and Information - Computer Hope
    Jan 6, 2025 · The MSDOS.SYS file is a hidden, system, read-only file created on the root of the boot drive, used to configure several settings.
  16. [16]
    Initializing Static VxDs at Startup - Techs Helps
    VMM32.VXD includes the real-mode loader, the executable Virtual Machine Manager, and common static VxDs. Notice, however, that if a VxD file is in the Windows ...Missing: 9x | Show results with:9x
  17. [17]
    KERNEL32 Functions - Geoff Chappell, Software Analyst
    May 20, 2010 · The large table on this page lists all the functions—there are nearing 2,000 of them, depending how you count—that appear in the export ...
  18. [18]
    Explorer Versions - Geoff Chappell, Software Analyst
    The Windows Explorer program (EXPLORER.EXE) has so far existed in seven variations considered by Microsoft to have sufficient external impact.
  19. [19]
    Windows GDI - Win32 apps
    ### Summary of GDI32.DLL Role in Graphics for Windows 9x
  20. [20]
    How to correct common User32.dll file errors - Microsoft Support
    User32.dll errors are typically corrected by repairing the User32.dll file or by reinstalling the program, the hardware component, or the driver that is ...Missing: GDI32. | Show results with:GDI32.
  21. [21]
    How to Fix MS-DOS Issues with Windows Me - Computer Hope
    Sep 7, 2025 · Solutions for MS-DOS issues on Windows Me, including guides on creating autoexec.bat, using ansi.sys alternatives, and configuring ...
  22. [22]
    Boot Process of Windows 9x - iSelfSchooling
    The system loads the registry , and INI files. Finally the system loads the configuration manager which loads the following components. Windows 9x Boot Process ...
  23. [23]
    [PDF] Guide to Securing Windows NT/9x Clients in a Windows 2000 Network
    Jan 23, 2001 · Because Windows 9x use the FAT file system rather than NTFS, access to directories and files cannot be protected with access control lists (ACLs) ...
  24. [24]
    Q174018: Description of the Windows 95 Startup Process
    ... BIOS bootstrap loads from the FFFF0h memory address. The following steps occur during the ROM BIOS bootstrap process: 1. The Power On Self-Test (POST) occurs.Missing: architecture | Show results with:architecture
  25. [25]
    System Requirements for Windows 95 - Techs Helps
    Windows 95 is designed for computers that use Intel x86-based processors; it cannot be installed on any other processor. Windows 95 does not have symmetric ...
  26. [26]
    Windows 95b Boot Sector - Chuck's Robotics Notebook - McManis
    Sep 2, 2003 · Abstract. This is a continuation of Windows 95b MBR which discusses the PC boot sequence and the MBR from a PC running Windows 95 OSR2.
  27. [27]
    [PDF] Microsott!Press ' - Bitsavers.org
    ... 95 Resource Kit provides a compact disc containing utilities for use with Windows 95. ... computers. For more information, see Chapter 16, "Remote.
  28. [28]
    Q174018: Description of the Windows 95 Startup Process
    ### Summary of Windows 95 Startup Process (Phase 6 and Later)
  29. [29]
    The Elegant Kludge - halfhill.com
    Under Windows 95 and Windows 3.1, the VMM is the kernel. The core OS services (the VxDs) execute beside it in ring 0, while applications (DOS, Win16, and Win32) ...<|separator|>
  30. [30]
    From Windows 9x to 11: Tracing Microsoft's security evolution
    Oct 31, 2023 · From 9x to Windows NT, which saw the move away from 16-bit DOS (and a lack of process and meaningful user/kernel protections) to a modern 32 ...<|separator|>
  31. [31]
    KERNEL32 Versions - Geoff Chappell, Software Analyst
    KERNEL32.DLL, is the lowest-level DLL that is in all versions of both the Windows that runs on DOS and the Windows that used to be called Windows NT.
  32. [32]
    [PDF] and Device Drivers - Bitsavers.org
    The code disk includes a library of wrapper functions that allow V xDs to be coded almost entirely in C. Which Version of Windows? This book covers both Windows ...
  33. [33]
    Differences in WDM Versions - Windows drivers | Microsoft Learn
    Dec 14, 2021 · Kernel-mode WDM drivers for Windows 98/Me must follow certain guidelines for using floating-point operations, MMX, 3DNOW!, or Intel's SSE ...Missing: introduction | Show results with:introduction
  34. [34]
    None
    Below is a merged summary of mode switching, segmentation, VMM role, upper memory blocks (UMBs), and limitations in Windows 95, based on the provided segments from Hazzah (1997). To retain all information in a dense and organized format, I’ll use a combination of narrative text and tables where appropriate. The content is synthesized to avoid redundancy while preserving all details, with page references included for traceability. The source URL is consistently provided as:
  35. [35]
    Undocumented Windows
    Schulman, Andrew. Undocumented Windows: a programmer's guide to reserved ... Interrupts with WISPy. 180. Starting a DOS Box. 184. Fixing WINIO. 185. Windows ...
  36. [36]
    Windows 98, FAT32 - HelpWithWindows.com
    The disk utilities included with Windows 98 have been revised to include FAT32 support, in particular: Fdisk, Format, ScanDisk, Defrag, and DriveSpace.
  37. [37]
    BIOS/OS Limits for Large HDDs
    Nov 10, 2005 · 137 GB (128 GiB) Limit for Win 98/Me and even Win 2000 ... it can use a larger FAT32 partition if it was created under Windows 98/Me.