Memory Paging

Windows 95, similar to Windows NT, uses a demand-paged virtual memory system. This system is based on a flat, linear address space accessed using 32-bit addresses.

Each process is allocated a unique virtual address space of 2 GB. The upper 2 GB is shared, while the lower 2 GB is private to the application. This virtual address space is divided into equal blocks, or pages.

Demand paging refers to a method by which code and data are moved in pages from physical memory to a temporary paging file on disk. As the information is needed by a process, it is paged back into physical memory.

The Memory Pager maps virtual addresses from the process's address space to physical pages in the computer's memory. In doing so, it hides the physical organization of memory from the process's threads. This ensures that the thread can access its process's memory as needed, but not the memory of other processes. Therefore, as shown in the following illustration, a thread's view of its process's virtual memory (as depicted on the left) is much simpler than the real arrangement of pages in physical memory.

To support a 16-bit operating environment including Windows 3.1 and MS-DOS, the Intel® processor architecture uses a mechanism called a segment. Segments reference memory by using a 16-bit segment address, and a 16-bit offset address within the segment. A segment is 64K in size, and both applications and the operating system suffer a performance penalty for accessing information across segments.

Windows 95 addresses this issue by using the 32-bit capabilities of the 80386 (and above) processor architecture to support a flat, linear memory model for 32-bit operating system functionality and Win32-based applications. A linear addressing model simplifies the development process for application vendors, and removes the performance penalties imposed by the segmented memory architecture.

With this addressing model, Windows 95 allows full use of the 4 GB of addressable memory space for all 32-bit operating system components and applications. Each 32-bit application can access up to 2 GB of addressable memory space, which is large enough to support even the largest desktop application.