IBM 000-8697 User Manual

Page of 702
System Architecture
2-19
UNIX Kernel and Semaphore-Allocation Parameters
The
shared-memory lower-boundary address
T
he maximum number of attached shared-memory segments per
process
T
he maximum amount of shared memory system-wide
The remaining three parameters are semaphore-allocation parameters:
T
he maximum number of semaphore identifiers
T
he maximum number of semaphores
T
he maximum number of semaphores per identifier
When tbinit creates the required shared-memory segments, it attempts to
acquire as large a segment as possible. The first segment size tbinit tries to
acquire is the size of shared memory, rounded up to the nearest multiple of
2 KB.
OnLine receives an error from the operating system if the requested segment
size is greater than the maximum allowable size. If OnLine receives an error,
tbinit
divides the requested size by 2 and tries again. For most installations,
more than one segment is required because of a
UNIX
 kernel limitation.
Attempts at acquisition continue until the largest segment size that is a
multiple of 2 KB can be created. Then tbinit creates as many additional
segments as are required to meet shared-memory requirements.
Shared-memory identifiers affect OnLine operation when a user process
attempts to attach to shared memory. For most operating systems, there are
no limits on the number of shared-memory identifiers that a particular user
process can create or attach to. Instead, user processes receive identifiers on
a “first come, first served” basis, up to the limit that is defined for the
operating system as a whole.
You might be able to calculate the maximum amount of shared memory that
the operating system can potentially allocate by multiplying the number of
shared-memory identifiers by the maximum shared-memory segment size.
Check that the maximum amount of memory that can be allocated is equal to
the total addressable shared-memory size for a single operating-system
process. The following display expresses the concept another way:
Maximum amount of shared memory =
(Maximum number of attached shared-memory segments per process) x
(Maximum shared-memory segment size)