Next | Prev | Up | Top | Contents | Index

Page Validation

Although an address is defined, the corresponding page is not necessarily loaded in physical memory. The sum of the defined address spaces of all processes is normally far larger than available real memory. IRIX keeps selected pages in real memory. A page that is not present in real memory is marked as "invalid" in the page tables. The contents of invalid pages can be supplied in one of the following ways:

TextPages of program text--executable code of programs and dynamically linked libraries--can be retrieved on demand from the program file or library files on disk.
DataPages of data from the heap and stack can be retrieved from the swap partition or file on disk.
MappedWhen a segment is created by mmap(), the backing store file is specified at creation time (see "Mapping Segments of Memory").
Never usedPages that have been defined but never used can be created as pages of binary zero when they are needed.

When a process refers to a VPN that is defined but invalid, a hardware interrupt occurs. The interrupt handler in the IRIX kernel chooses a page of physical RAM to hold the page. In order to acquire this space, the kernel might have to invalidate some other page belonging to your process or to another process. The contents of the needed page are read from the appropriate backing store into memory, and the process continues to execute.

Page validation takes from 10 to 50 milliseconds. Most applications are not impeded by page fault processing, but a real-time program cannot tolerate these delays.

The total size of all the valid pages in an address space is displayed by the ps command under the heading SZ. The aggregate size of the pages that are actually in memory is the resident set size, displayed by ps under the heading RSS.


Next | Prev | Up | Top | Contents | Index