Real-memory management

The VMM plays an important role in the management of real memory.

Virtual-memory segments are partitioned into fixed-size units called pages. AIX 7.1 running on POWER5+ processors supports four page sizes: 4 KB, 64 KB, 16 MB, and 16 GB. For more information, see Multiple page size support. Each page in a segment can be in real memory (RAM), or stored on disk until it is needed. Similarly, real memory is divided into page frames. The role of the VMM is to manage the allocation of real-memory page frames and to resolve references by the program to virtual-memory pages that are not currently in real memory or do not yet exist (for example, when a process makes the first reference to a page of its data segment).

Because the amount of virtual memory that is in use at any given instant can be larger than real memory, the VMM must store the surplus on disk. From the performance standpoint, the VMM has two, somewhat opposed, objectives:
  • Minimize the overall processor-time and disk-bandwidth cost of the use of virtual memory.
  • Minimize the response-time cost of page faults.

In pursuit of these objectives, the VMM maintains a free list of page frames that are available to satisfy a page fault. The VMM uses a page-replacement algorithm to determine which virtual-memory pages currently in memory will have their page frames reassigned to the free list. The page-replacement algorithm uses several mechanisms:

  • Virtual-memory segments are classified into either persistent segments or working segments.
  • Virtual-memory segments are classified as containing either computational or file memory.
  • Virtual-memory pages whose access causes a page fault are tracked.
  • Page faults are classified as new-page faults or as repage faults.
  • Statistics are maintained on the rate of repage faults in each virtual-memory segment.
  • User-tunable thresholds influence the page-replacement algorithm's decisions.