NonStop S-Series Server Description Manual (G06.24+)
Memory Addressing and Access
HP NonStop S-Series Server Description Manual—520331-003
4-30
Kseg2 Usage
Kseg2 Usage
The Kseg2 portion of privileged space comprises absolute segments 8192 through
16383. Like nonprivileged space, Kseg2 is organized into regions. Being half the size
of nonprivileged space, however, Kseg2 has 32 regions instead of 64.
Most of the Kseg2 space, as shown in Figure 4-14, is used to address absolute
memory and is therefore global in nature. However, the third region of this space
(region C4) is nonglobal and, for each process, is used for the allocation of its process
file segment (PFS), its privileged stack, its debug stack, and other temporary
information related to the particular process. In addition, the last three segments of
Kseg2 are reserved. A portion of this area is kept empty to provide a useful range of
nil addresses, which are never mapped to physical memory.
Out of the first two regions in Kseg2, many of the first 128 unitary segments (the first
region) are reserved for system allocations. This area includes absolute memory
allocations for the system library, system processes created by SYSGENR, and so on.
The remainder of those first two regions provide the initial part of the absolute memory
allocations for the many processes that exist in the processor: user code, user library,
user data, and logical segments. (The remaining, greater, part of the absolute memory
allocations is available beginning in the fourth region, C6.)
With the exception of unaliased segments, every process-relative unitary segment in
all existing nonprivileged spaces has a corresponding image in absolute memory.
Therefore each process-relative address has a corresponding absolute address.
The reason for having absolute addresses in addition to process-relative addresses is
to provide a context-independent (global) means of addressing elements belonging to
a given process (a context). Such addresses are needed by, for example, interrupt
handlers. The process-relative address alone is not meaningful to these routines.
Absolute addressing provides an alias as a means of accessing process elements.
Any segment that also has an absolute address is said to be a kernel-aliased
segment. The TNS user data segment and all code segments have associated
absolute segments; the RISC stacks, heap, native globals, and SRL instance data do
not. Therefore user code (UC), user library (UL), system code (SC), and SRL code are
all aliased. By default, both flat segments and selectable segments are unaliased;
however, the application must be a privileged program to have unaliased versions of
segments.
Another means of accessing process elements (context-bound addresses for
unaliased segments) is discussed under Context-Bound Addresses on page 4-50.
Each kernel-aliased logical segment (code or data) has a corresponding set of
consecutive absolute segments. For TNS processes, there is one absolute segment
for user data.
The absolute segments constituting a single logical segment are contiguous, but the
various segments of a process have unrelated absolute addresses. The absolute
addresses of an aliased logical segment change if the segment is enlarged with