The amount of paging space required by an application depends on the type of activities performed on the system. If paging space runs low, processes may be lost. If paging space runs out, the system may panic. When a paging space low condition is detected, additional paging space should be defined.
The system monitors the number of free paging space blocks and detects when a paging space shortage exists. The vmstat command obtains statistics related to this condition. When the number of free paging space blocks falls below a threshold known as the paging space warning level, the system informs all processes (excepts kprocs) of the low condition by sending the SIGDANGER signal.
Note: If the shortage continues and falls below a second threshold known as the paging space kill level, the system sends the SIGKILL signal to processes that are the major users of paging space and that do not have a signal handler for the SIGDANGER signal (the default action for the SIGDANGER signal is to ignore the signal). The system continues sending SIGKILL signals until the number of free paging space blocks is above the paging space kill level.
Processes that dynamically allocate memory can ensure that sufficient paging space exists by monitoring the paging space levels with the psdanger subroutine or by using special allocation routines. Processes can avoid being ended when the paging space kill level is reached by defining a signal handler for the SIGDANGER signal and by using the disclaim subroutine to release memory and paging space resources allocated in the data and stack areas, and in shared memory segments.
Other subroutines that can assist
in dynamically retrieving paging information from the VMM include the
|Determines the residency of memory pages.
|Permits a process to advise the system about its expected paging behavior.
|Returns paging device status.
|Activates paging or swapping to a designated block device.
Program Address Space Overview.
System Memory Allocation Using the malloc Subsystem.
Paging Space Overview.
Virtual Memory Manager (VMM) in AIX 5L Version 5.1 Performance Management Guide describes the VMM and its page-stealing algorithms in detail.
Memory Kernel Services in AIX 5L Version 5.1 Kernel Extensions and Device Support Programming Concepts describes the various kernel extensions available to manipulate kernel memory.
Paging Space Overview in AIX 5L Version 5.1 System Management Guide: Operating System and Devices.
_end, _etext or _edata Identifier in AIX 5L Version 5.1 Technical Reference: Base Operating System and Extensions Volume 1.
ipcs command, ipcrm command, vmstat command, pagesize command, update command in AIX 5L Version 5.1 Commands Reference.
ftok subroutine, fsync subroutine, monitor subroutine, moncontrol subroutine, monstartup subroutine in AIX 5L Version 5.1 Technical Reference.