How Windows 3.11 Managed Virtual Memory Paging

Microsoft Windows 3.11 managed virtual memory paging by combining the hardware paging capabilities of the Intel 80386 processor with specialized disk-level swap files. When running in 386 Enhanced Mode, the operating system expanded available system memory beyond physical RAM limits by offloading inactive 4 KB memory pages to local hard drives. This subsystem relied on two primary components: configurable swap files (either temporary or permanent) and low-level 32-bit controller drivers that bypassed the traditional, slow real-mode BIOS and DOS input/output pathways.

The 386 Enhanced Mode Architecture

Windows 3.11 achieved virtual memory through the memory management unit (MMU) of the Intel 80386 (and newer) processors. In 386 Enhanced Mode, the system operated in 32-bit protected mode, enabling flat memory addressing and demand paging. Physical and virtual address spaces were segmented into standard 4 KB pages. When an application required more memory than was physically available, or when memory lay idle, the virtual memory manager committed the least recently used pages to disk, freeing physical RAM for active threads.

When a running process attempted to access a page that resided on the disk rather than in physical RAM, the processor triggered a Page Fault (Interrupt 14). The Windows Virtual Machine Manager (VMM) caught this fault, retrieved the requested page from the disk, mapped it back into an available physical memory frame, and resumed execution seamlessly.

Permanent vs. Temporary Swap Files

Windows 3.11 supported two distinct strategies for allocating swap space on a local File Allocation Table (FAT) partition:

  1. Permanent Swap Files (386SPART.PAR): A permanent swap file was a pre-allocated, contiguous block of disk sectors marked as hidden and system. Because the file was completely unfragmented and fixed in size, Windows did not have to query the DOS File Allocation Table to locate individual clusters. It maintained a direct sector-mapping table recorded in a tiny pointer file named SPART.PAR in the Windows directory. This direct linear addressing dramatically cut disk lookup overhead and reduced read/write latencies during memory paging.

  2. Temporary Swap Files (WIN386.SWP): If a user opted not to reserve contiguous disk space permanently, Windows created a dynamic file named WIN386.SWP upon startup and deleted it upon exit. While this preserved hard drive capacity when Windows was not running, it came with performance penalties. The file could become fragmented across non-contiguous clusters, forcing Windows to resolve disk addresses through standard filesystem mechanics, which introduced latency during heavy paging.

32-Bit Disk Access (FastDisk)

In standard operations, DOS-based software accessed local hard disks via real-mode BIOS interrupts (INT 13h). Paging through the BIOS required the CPU to switch from 32-bit protected mode into 16-bit real mode (or Virtual 8086 mode), execute the disk write or read, and then switch back. This mode-switching process caused noticeable CPU overhead and degraded system performance.

To overcome this, Windows 3.11 implemented 32-Bit Disk Access, known technically as FastDisk. FastDisk relied on specialized Virtual Device Drivers (VxDs), most notably *wdctrl, designed for standard Western Digital-compatible IDE/ATA controllers.

When FastDisk was active:

  • The paging manager intercepted disk read and write requests while remaining entirely in 32-bit protected mode.
  • The driver talked directly to the hard disk controller hardware registers via direct I/O ports.
  • By eliminating the need to drop down to the 16-bit BIOS INT 13h handler, disk paging occurred without CPU mode switches, allowing virtual memory transfers to execute with minimal overhead.

32-Bit File Access in Windows for Workgroups 3.11

Windows for Workgroups 3.11 improved this process further by introducing 32-Bit File Access. Earlier iterations still depended on 16-bit real-mode DOS routines to process the FAT filesystem layer itself. Windows for Workgroups 3.11 introduced VFAT.386, a 32-bit protected-mode implementation of the FAT file system, alongside VCACHE.386, a dynamic 32-bit disk caching engine.

Together with FastDisk, 32-Bit File Access allowed the operating system to handle both filesystem lookups and disk sector input/output entirely within protected mode. Even when using a dynamic, temporary swap file, Windows 3.11 could page memory without ever falling back to DOS or BIOS code, providing a stable, high-throughput virtual memory architecture within the constraints of standard PC hardware of the era.