Windows NT Virtual Memory Manager Uses FIFO

Last reviewed: December 20, 1996
Article ID: Q98216
The information in this article applies to:
  • Microsoft Win32 Application Programming Interface (API) included with:

        - Microsoft Windows NT versions 3.1, 3.5, 3.51, 4.0
    

On page 193 of "Inside NT," Helen Custer states that the Windows NT virtual memory manager uses a FIFO (first in, first out) algorithm, as opposed to a LRU (least recently used) algorithm, which the Windows virtual memory manager uses. While it is true that FIFO can result in a commonly used page being discarded or paged to the pagefile, there are reasons why this algorithm is preferable.

Here are some of the advantages:

  • FIFO is done on a per-process basis; so at worst, a process that causes a lot of page faults will slow only itself down, not the entire system.
  • LRU creates significant overhead--the system must update its page database every single time a page is touched. However, the database may not be properly updated in certain circumstances. For example, suppose that a program has good locality of reference and uses a page constantly so that it is always in memory. The operating system will not keep updating the timestamp in the page database, because the process is not hitting the page table. Therefore this page may age even though it is in nearly constant use.
  • Pages that are "discarded" are actually kept in memory for a while, so if a page is really used frequently, it will be brought back into memory before it is written to disk.


Additional reference words: 3.10 3.50 3.51 4.00
KBCategory: kbprg
KBSubcategory: BseMm


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: December 20, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.