Chapter 7 -- Memory Management

[Previous] [Next]

Chapter 7

In this chapter, you'll learn how Microsoft Windows 2000 implements virtual memory and how it manages the subset of virtual memory kept in physical memory. These jobs involve two primary tasks:

  • Translating, or mapping, a process's virtual address space into physical memory so that when a thread running in the context of that process reads or writes to the virtual address space, the correct physical address is referenced. (The subset of a process's virtual address space that is physically resident is called the working set. Working sets are described in more detail later in this chapter.)
  • Paging some of the contents of memory to disk when it becomes overcommitted—that is, when running threads or system code try to use more physical memory than is currently available—and bringing the contents back into physical memory when needed.

As you saw in Chapter 2 (Table 2-2), Windows 2000 Professional and Server systems support up to 4 GB of physical memory, Windows 2000 Advanced Server supports up to 8 GB, and Windows 2000 Datacenter Server up to 64 GB. (Actual supported maximum memory for Windows 2000 Datacenter Server depends on available hardware. Windows 2000 Datacenter Server wasn't released at the time we wrote this book, so we were unable to verify whether the hardware currently available will support the operating system maximum of 64 GB.)

Because Windows 2000 is a 32-bit operating system, user processes have a flat 4-GB 32-bit virtual address space. How a 32-bit process can allocate and use large amounts of physical memory is explained in the section "Address Windowing Extensions" later in this chapter.

Microsoft has publicly announced plans to provide a true 64-bit version of Windows that will support the Intel Itanium processor family. A new 64-bit API, called Win64, will support true 64-bit addresses. The reason for supporting this platform is the same reason Microsoft moved from a 16-bit to a 32-bit address space—ever increasing requirements for storing and processing huge amounts of data in memory. The 64-bit version of Windows alleviates the address space limitations of Windows 2000 by providing a large, flat 64-bit virtual address space for processes. For more on 64-bit Windows, see the section "Getting Ready for 64-bit Windows" in the Platform SDK or the information on Microsoft's Web site at

In addition to providing virtual memory management, the memory manager provides a core set of services on which the various Windows 2000 environment subsystems are built. These services include memory mapped files (internally called section objects), copy-on-write memory, and support for applications using large, sparse address spaces. In this chapter, we'll summarize these basic services and review pertinent concepts such as reserved versus committed memory and shared memory. We'll also describe the internal structure and components that make up the memory manager, including key data structures and algorithms.

Inside Microsoft Windows 2000
Inside Microsoft Windows 2000, Third Edition (Microsoft Programming Series)
ISBN: 0735610215
EAN: 2147483647
Year: 2000
Pages: 121

Similar book on Amazon © 2008-2017.
If you may any questions please contact us: