Windows 3.11 Virtual Memory Paging Driver Explained

In Microsoft Windows 3.11, virtual memory paging algorithms and swap file operations were handled primarily by the internal PAGEFILE driver (referenced as *pagefile in configuration files), which operated under the direct control of the Virtual Machine Manager (VMM) inside WIN386.EXE. This article explains how the PAGEFILE driver managed virtual memory in 386 Enhanced Mode, the mechanics of Windows 3.11 swap files, and how 32-bit subsystem enhancements optimized memory paging performance.

The Core Driver: PAGEFILE and the Virtual Machine Manager

Windows 3.11 relied on a 32-bit protected-mode architecture when operating in 386 Enhanced Mode. In this mode, the core engine was WIN386.EXE, which unpacked the Virtual Machine Manager (VMM) and a suite of built-in Virtual Device Drivers (VxDs).

The primary components responsible for memory paging were:

  • The Virtual Machine Manager (VMM): Contained the fundamental memory manager and demand-paging algorithms. It implemented a two-level page table scheme native to the Intel 80386 processor, mapping 4 KB virtual pages to physical memory frames using a Least Recently Used (LRU) algorithm to decide which pages to discard or write to disk.
  • PAGEFILE (*pagefile): The built-in paging device driver specified in SYSTEM.INI under the [386Enh] section (via the entry PagingFile=*pagefile). This VxD provided the abstraction layer between the VMM’s paging algorithms and the physical storage medium, facilitating the transfer of 4 KB memory blocks between RAM and the swap file.

Swap File Architecture

The *pagefile driver managed two distinct types of swap files on disk to back up physical RAM:

  1. Temporary Swap File (WIN386.SWP): Allocated dynamically when Windows started and deleted upon exit. Paging performance was lower because the file could become fragmented across the disk, requiring translation through standard file allocation mechanisms.
  2. Permanent Swap File (386SPART.PAR): A contiguous block of disk sectors reserved permanently by the system, tracked by a hidden pointer file named SPART.PAR. Because the blocks were entirely contiguous, the *pagefile driver could compute disk sector offsets directly without navigating MS-DOS FAT table chains, significantly reducing paging latency.

Acceleration via 32-Bit Disk and File Access

While the *pagefile driver managed the memory paging logic, the actual I/O throughput of paging in Windows 3.11 depended on auxiliary drivers:

  • FastDisk (WDCTRL.386): Handled 32-Bit Disk Access by communicating directly with Western Digital-compatible IDE/ATA controllers. This allowed the paging driver to bypass real-mode MS-DOS and BIOS INT 13h interrupts, executing page reads and writes entirely within 32-bit protected mode.
  • VFAT (VFAT.386) and VCACHE (VCACHE.386): Introduced in Windows for Workgroups 3.11, these 32-bit file system drivers allowed temporary swap files to achieve near-permanent swap file speeds by eliminating real-mode BIOS transitions during file I/O operations.