Consultor Eletrônico



Kbase 20684: Overview of Memory Management System on HP-UX Systems
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   2/25/2008
Status: Unverified

GOAL:

Provide an overview of the memory management system for the HP-UX operating system.

FIX:

The HP-UX memory management system is designed to make memory resources available safely and efficiently among threads and processes in the following ways:
- It provides a complete address space for each process that is
protected from all other processes.

- It enables program size to be larger than physical memory.

- It decides which threads and processes reside in physical
memory, and manipulates threads and processes in and out of
memory.

- It manages the parts of the virtual address space of a thread
or process not in physical memory and determines what portions
of the address space should reside in physical memory.

- It allows efficient sharing of memory between processes.

The data and instructions of any process (a program in execution) or thread of execution within a process must be available to the CPU by residing in physical memory at the time of execution.

To execute a process, the kernel creates and sets up a per-process virtual address space. Portions of the virtual space are mapped onto physical memory. Virtual memory allows the total size of user processes to exceed physical memory. Through "demand paging", HP-UX enables you to execute threads and processes by bringing virtual pages into main memory (on demand) and pushing out portions of a process's address space that have not been recently used.

The term "memory management" refers to the rules that govern physical and virtual memory and allow for efficient sharing of the system's resources by user and system processes. The system uses a combination of PageOut and deactivation to manage physical memory.

Paging involves writing recently unreferenced pages from main
memory to disk from time to time. A page is the smallest unit of
physical memory that can be mapped to a virtual address with a
given set of access attributes. On a loaded system, total
unreferenced pages might be a large fraction of memory.

Deactivation takes place if the system is unable to maintain a
large enough free pool of physical memory. When an entire process
is deactivated, the pages associated with the process can be
written out to secondary storage because they are no longer
referenced. A deactivated process cannot run, and therefore,
cannot reference its data.

Secondary storage supplements physical memory. The memory management system monitors available memory and, when it is low, writes out pages of a process or thread to a secondary storage device called a swap device. The data is read from the swap device back into physical memory when it is needed for the process to execute.