Guardian Procedure Calls Reference Manual (G06.25+)

Guardian Procedure Calls (A-B)
Guardian Procedure Calls Reference Manual522629-013
2-26
ALLOCATESEGMENT Procedure
(Superseded by SEGMENT_ALLOCATE_
Examples of valid pin-and-flags word values are:
%000
nnn Allocate a shared segment, to be shared using the PIN method
with the process identified by the PIN specified in
nnn.
%040000 Standard call to allocate a segment (default values).
%044000 Allocate an extensible segment.
%050000 Allocate a segment to be shared by the file-name method.
%054000 Allocate an extensible segment to be shared by the file-name
method.
%060000 Allocate a read-only segment.
Considerations
Preventing automatic temporary file purge
ALLOCATESEGMENT opens the swap file for read/write protected access. A
process can prevent the automatic file purge of a temporary swap file by opening
the file for read-only shared access before the segment is deallocated.
Nonexisting temporary swap file
If a shared segment is being allocated (
pin-and-flags bits <2:3> not equal to 0)
and only a volume name is supplied in the
file-name parameter, then the
complete file name of the temporary file created by ALLOCATESEGMENT is
returned.
Swap file extent allocation
If a shared extensible segment is being created, then only one extent of the swap
file is allocated when ALLOCATESEGMENT returns. If a nonsharable extensible
segment is being created, no extents are allocated until the user accesses the
segment.
Note that if ALLOCATESEGMENT creates the swap file, it configures the extent
sizes based on a maximum of 64 extents.
Segment sharing
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 the following 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-id,255)
Any process, if $X has a PAID of the super ID (255,255)
If processes are running in different processors, they can share a segment only if
the security requirements are met and the segment is a read-only segment.