Learn More About the Virtual Memory Paging File



"Pages" are blocks of information that are the same size. Your operating system retrieves information in a variety of different ways. One method is called paging and this is when your operating system (such as Windows XP, Vista or Windows 7) retrieves data from the virtual memory in these same-size chunks called pages.

What is the advantage of this? It renders the whole process harmless. Virtual memory paging allows information to be temporarily stored somewhere other than physical memory. The physical memory is commonly known as RAM, Random Access Memory. Using virtual memory frees up your RAM to perform its necessary functions. Paging allows the transfer of information to happen seamlessly; no information is lost or fragmented.

The paging process is critical to your system's memory and overall operating capacity. Your system needs virtual memory to cope with all your information and programs. Without it, RAM would become cluttered and sluggish and you computer would be inoperable. With virtual memory, your RAM can temporarily move some unnecessary files over and increase its capacity to run several critical functions at once.

A "page fault" is when a program tries to access a page that hasn't yet been copied in the physical memory. Your operating system needs to be able to take care of a page fault without the program ever knowing that it even occurred. This way the application will still launch and no harm is done. Therefore, the basic operating capabilities of the operating system consist of:

  • Finding data in the virtual memory.
  • Obtaining a fresh page in the virtual memory that it can use to transfer and store data.
  • Transferring the information to the page.
  • Updating the page table to reflect the new information.
  • Transferring control back to the program.

The need to cite the memory at a specific address is based on two reasons:

  • Sometimes the processor tries to run the program's instructions on its own
  • Sometimes bits of information are accessed at a program's request

If all the pages in the virtual memory's capacity are in use the RAM will have to swap an old page with a new page. It will have to identify the page that needs to be swapped by reviewing page usage and determining which page hasn't been used in a while. The formula that it uses to decide something like that is complex. In essence, your computer uses a LRU page replacement algorithm (LRU stands for "Least Recently Used") to decide which page to swap.

 

Microsoft is a registered trademark of Microsoft Corporation in the United States and/or other countries.