2-20 IBM Informix OnLine Database Server Administrator’s Guide
UNIX Kernel and Semaphore-Allocation Parameters
If this relationship does not hold, either one of two undesirable situations
could develop:
If the total amount of shared memory is less than the total
addressable size, you are able to address more shared memory for
the operating system than that which is available.
If the total amount of shared memory is greater than the total
addressable size, you can never address some amount of shared
memory that is available. That is, space that could potentially be
used as shared memory cannot be allocated for that use.
OnLine operation requires oneUNIX semaphore for each user structure in
sharedmemory. During shared-memory creation, tbinit attempts to allocate
semaphores in blocks of 25. If the maximum number of semaphores per
shared-memory identifier is fewer than 25,tbinit receives an error when it
attempts to allocate the semaphores. The maximum number of semaphore
identifiersshould be close to the maximum number of OnLine users on a host
machine, divided by 25.
When OnLine user processes attach to shared memory, each user process
specifiesthe address at which to attach the first segment. This address is the
OnLine parameter SHMBASE.
OnLine assumes that the next segment can be attached at the address of the
previous segment, plus the size of the shared-memory segment; that is,
contiguous to the first segment. However, yourUNIX system might set a
parameter that defines the lower-boundary address of shared memory for
attachingshared-memory segments. If so, the next shared-memory segment
attempts to attach at the address of the previous segment, plus the value of
the lower-boundary address. If the lower-boundary address is greater than
the size of the shared-memory segment, the next segment is attached to a
point beyond the end of the previous segment, creating a gap between the
two segments. Since shared memory must be attached to a user process so
that it looks like contiguous memory, this gap creates problems. If this
situationoccurs, OnLine receives errors during the attach. An example of this
situation is shown inFigure 2-1.