Published on June 18, 2007
Windows XP/Vista Memory Management: Windows XP/Vista Memory Management David Miller Cody Hawkins Windows XP Memory: Windows XP Memory Virtual Memory: Virtual Memory Paged out frames are located in pagefile.sys File is located on root directory Size can change dynamically as needed Size is user Configurable. Best if located on separate hard drive. Virtual Memory in XP: Virtual Memory in XP 4 GB Virtual Memory Address Space (32 bit) 2 GB Private Process Space 2 GB Operating System Use Application Memory Tuning /3GB switch Physical Address Extension (PAE) Address Windowing Extensions (AWE) Application Memory Tuning /3GB switch : Application Memory Tuning /3GB switch To accommodate those applications that can effectively use private virtual memory larger than 2 GB, the Application Memory Tuning feature was created. It moves the boundary between the private part of the 4 GB virtual address space from 2 GB to 1 GB so that the private part of the address space is 3 GB. This feature is activated by using the /3GB switch in the boot.ini file. Physical Address Extension (PAE): Physical Address Extension (PAE) Using the processor architecture defined registers and tables, 32 bit virtual addresses can be mapped into RAM pages above the 4 GB boundary. This hardware feature is supported by Windows NT, 2000, XP, 2003 and later. This feature is activated by using the /PAE switch in the boot.ini. Address Windowing Extensions(AWE): Address Windowing Extensions (AWE) AWE is a set of functions that an application can use to request the operating system to map pages of RAM into its 4 GB virtual address space. Using this feature, an application can thus use more RAM than the usual 2 GB available in the private part of the virtual memory. This can be useful for applications that can benefit from more memory than is normally available. 64 Bit Virtual Memory: 64 Bit Virtual Memory 18 Exa-byte address space is available for 64 bit systems so these tricks probably won’t be necessary much longer. New Features of Windows XP Memory Management: New Features of Windows XP Memory Management Logical prefetcher for faster boot and application launch Enhanced memory management for better scalability Reduced paged pool usage Increased number of system Page Table Entries Windows Vista: Windows Vista Slide11: Windows XP Windows Vista At the time these screenshots were taken, the machines had a few instances of IE7 running, plus one remote desktop. 1.5 GB (XP) compared to 6MB (Vista) of physical free space left. Windows Vista: The most important rule of cache design is that empty cache memory is wasted cache memory. Empty cache isn't doing you any good. It's expensive, high-speed memory sucking down power for zero benefit. The primary mission in the life of every cache is to populate itself as quickly as possible with the data that's most likely to be needed-- and to consistently deliver a high 'hit rate' of needed data retrieved from the cache. Otherwise you're going straight to the hard drive. Vista uses what they call SuperFetch – Pre-emptively populate every byte of system memory with what might be needed next. Windows Vista SuperFetch: SuperFetch SuperFetch uses an intelligent prioritization scheme that understands which applications you use most often and preloads these applications into memory, so your system is more responsive. SuperFetch, and can even differentiate which applications you are likely to use at different times (for example, on the weekend versus during the week), so that your computer is ready to do what you want it to do. Windows Vista can also prioritize your applications over background tasks, so that when you return to your machine after leaving it idle, it's still responsive. SuperFetch: SuperFetch Downside: SuperFetch will fill the leftover free memory on a low-priority background disk thread. When running a high-resolution, high-performance application (i.e. gaming) it can really slow things down. Non-Uniform Memory Access (NUMA): Non-Uniform Memory Access (NUMA) Non-Uniform Memory Access (NUMA) is a computer memory design used in multiprocessors where the memory access time depends on the memory location relative to a processor. Under NUMA, a processor can access its own local memory faster than non-local memory, that is, memory local to another processor or memory shared between processors. NUMA provides separate memory for each processor, avoiding the performance hit when several processors attempt to address the same memory. For problems involving spread data (common for servers and similar applications), NUMA can improve the performance over a single shared memory by a factor of roughly the number of processors (or separate memory banks). For this to work NUMA systems include additional hardware or software to move data between banks. NUMA is not entirely new to Windows but Vista is designed to handle and support it better. Large-page support: Large-page support Large-page support enables server applications to establish large-page memory regions, which is particularly useful on 64-bit Windows Vista. Each large-page translation uses a single translation buffer inside the CPU. The size of this buffer is typically three orders of magnitude larger than the native page size; this increases the efficiency of the translation buffer, which can increase performance for frequently accessed memory. Exam Questions: Exam Questions The process by which system memory is pre-emptively populated with what might be needed next is called: A. VistaCache B. SuperFetch C. NUMA D. Large-paging (True/False) The /3GB switch moves the boundary between the private part of the 4 GB virtual address space from 2 GB to 1 GB so that the private part of the address space is 3 GB.