Adaptive Address Space Whitepaper
limitations of
traditional HP-
UX address
space models
virtual address space for 64-bit MGAS processes lies in octants 0,1 and 6.
The layout for a 64-bit process on PA-RISC is significantly different and is not
shown here.
The traditional address space layouts of HP-UX suffered from the following
limitations:
1. On HP-UX, processes have a fixed distribution of the processes’ virtual
address space into ‘shared’ address space and ‘private’ address space
(i.e. virtual address space in which processes can share data among
themselves VS virtual address space in which processes can attach
data that is meant for the use by the attaching process alone). This
distribution of virtual address space is fixed at compile / link time. This
means that a process cannot dynamically decide how much data in
memory it wants private and how much it wants to share. This restriction
mainly impacts 32-bit processes.
2. A 32-bit process cannot get a single data object greater than 1GB in
size if it wants to share it with other processes. This restriction applies
even if the process has more than 1GB of shared address space
available.
3. The shared address space available to 32-bit processes is consumed by
all processes that read / write shared data. This means that a process’s
pool of shared data space available can be consumed by other
processes – even by other processes that are not sharing data with this
process.
4. The mmap(2) system call cannot be used to map a portion of a file
multiple times. A number of applications and libraries use the mmap()
system call to read / write data from files. The inability to map pieces of
the file multiple times complicates application logic. This applies to both
32-bit and 64-bit applications. (This applies only if the MAP_SHARED flag
is specified in the mmap() call).
5. Some complex sequences of mmap(2) can fail. For instance, if process
A maps page 1 of a file using the MAP_SHARED flag of mmap(2), and
process B tries to map pages 1 and 2, it could fail. [The workaround in
this case is to have process B map first, or have process A map both
pages 1 and 2 even though it needs only 1 page – process A does not
loose any virtual address space in doing this]. This applies to both 32-bit
and 64-bit applications.
The Adaptive Address Space project provides the user with a new type of
address space layout, called “Mostly Private Address Space” (or MPAS for
short), that can overcome these limitations. This makes it easier to port
applications to HP-UX from other operating systems that provide these features.
It also simplifies the design of applications written for HP-UX.
6