Individual pages on the machine that are not permanently dedicated to the kernel are tracked by a page structure. This structure keeps some state information about a page and a pointer to the vnode to which the data in this page belongs. A list of pages organized by vnode and offset (how far into the "file" this page belongs) keeps track of pages containing data for specific vnodes. If a user wants a certain piece of data from some file, the kernel can rapidly find out if that data is already resident in memory. There are many functions that deal with pages: finding them, freeing them, hashing them, locking them. These all deal with pages above a hardware level and are generally similar across versions of the OS. Some that you may see are:
There are a lot more page functions. The page structure and the list of page related functions are defined in /usr/include/vm/page.h . |