Adaptive Address Space Whitepaper
mmap
For MPAS processes, mmap() calls made by this process are independent of
independence
calls made by any other process. In the case cited earlier in the section
“limitations of traditional HP-UX address space models”, item number 5, process
B could not mmap() pages 1 and 2 of a file because another process A had
mmap()ed page 1. This, and all such inter-process limitations are removed for
MPAS processes.
multiple mmap()s
As described in limitation number 4 in the section “limitations of traditional HP-
of the same data
UX address space models”, traditional HP-UX processes (those not using MPAS)
cannot mmap the same portion of a file more than once using the
MAP_SHARED flag. For instance, if a process has mapped page 1 of a file, then
it cannot map page 1 again (or map pages 1 and 2) without first unmapping
the previous mapping.
For an MPAS process, each call to mmap is independent of other mappings
made by the same process. Apart from the above mentioned ability to map
the same portion of the file multiple times, this also means that each mapping
can be mprotect(2)’ed individually.
preffered address
Traditionally, HP-UX applications have a very limited ability to specify a
for shmat()
preferred address during the call to shmat(2) to attach a system V shared
memory segment. A process either specified a NULL address, in which case the
kernel was free to choose any address. Or, the process had to specify the very
same address that other processes had attached the segment at. Any other
address would fail. This restriction is lifted for MPAS processes, which can specify
any preferred address with shmat().
how to get
To use the features provided by the AAS, the binary has to be converted to use
MPAS?
the MPAS layout. This can be done under the following rules:
• Binary has to be linked with a linker provided with HP-UX 11i V2 or later.
• Provide ld(1) / chatr(1) option to change an executable to MPAS
model: +as mpas
Other +as options:
• share_magic
• exec_magic
• shmem_magic
• mgas (same as share_magic for 32-bit)
(This section mentions technical details that can be skipped by a reader interested only in an
usage details
overview of AAS).
While designing / running applications that use MPAS processes, the following
points will need to be considered:
1. An MPAS process can get up to 4GB of address space. To actually
succeed in large allocation attempts, the user would need to set
tunables, process resource limits, etc. to get all the memory desired. E.g.
to get a 4GB heap for a 32-bit MPAS process, set the RLIMIT_AS limit and
9