Guardian Procedure Calls Reference Manual
• Swap file extent allocation
If an extensible segment is being created, then only one extent of the swap file is allocated
when SEGMENT_ALLOCATE[64]_ returns.
• Segment sharing
Callers of ALLOCATESEGMENT Procedure (Superseded by SEGMENT_ALLOCATE[64]_
Procedures) (page 58) can share segments with callers of SEGMENT_ALLOCATE[64]_. High-PIN
callers can share segments with low-PIN callers. Shared memory segments created with the
OSS shmget() function cannot be shared using SEGMENT_ALLOCATE[64] and vice versa.
• Segment Sharing by the PIN method
Subject to security requirements, a process can share a segment with another process running
on the same processor. For example, process $X can share a segment with any of these
processes on the same processor:
◦ Any process that has the same process access ID (PAID)
◦ Any process that has the same group ID, if $X is the group manager (that is, if $X has a
PAID of group,255)
◦ Any process, if $X has a PAID of the super ID (255,255)
A read/write segment can be shared with read-only access.
• Segment sharing by the file-name method
To share a segment by file name, the process must have appropriate access to the file. That
is, for a read/write segment, the process must have read and write access to the file; for a
read-only segment, it must have read access. All processes sharing a file-backed segment must
be in the same processor, unless the segment is read-only.
A read/write file-backed segment is eligible for sharing by file name only if it was allocated
with segment-type SEGMENT_TYPE_FILENAME or SEGMENT_TYPE_EXTENS_FILENAME.
The sharer must specify the same segment-type. However, a segment ineligible for sharing
by file name can be shared by pin, subject to access permissions. A read-only segment is
always eligible for sharing by file name.
In segment sharing by the file-name method, a read-write segment cannot be shared with
read-only access.
• Read-only segments
A read-only segment must be file-backed; the file provides the content of the segment. However,
using the share by pin method, a read/write segment can be shared with read-only access
in the sharer.
• Sharing flat or selectable segments
A process cannot share a flat segment with a selectable segment (or vice versa), because the
segments reside in different parts of memory.
• Flat segment alignment and address space fragmentation
For efficient internal mapping, the operating system attempts to create segments with base
addresses at convenient alignments, which are multiples of certain powers of two. The specific
powers of two involved depend upon the hardware platform and the software release version.
The system attempts to allocate a given segment at an optimally aligned address; if insufficient
address space is available, it tries successively less optimum alignments.
For purposes of alignment, the relevant size is the maximum size of the segment, which defaults
to the segment-size value but can be specified as max-size. If the base-address
parameter is specified as an input, the supplied value must satisfy the minimum alignment.
SEGMENT_ALLOCATE[64]_ Procedures 1269