2-12 IBM Informix OnLine Database Server Administrator’s Guide
What Happens During Shared-Memory Initialization
Thetbinit process uses the configuration values to calculate the required size
of OnLine shared memory.
Step 2: Create Shared Memory
Aftertbinit finishes computing the configuration values, it forks a child
process, which becomes thetbinit daemon. From this point on, the child
(daemon)process performs the initialization tasks. The parent process sleeps
until the child wakes it.
Thetbinit daemon creates shared memory by acquiring the shared-memory
space fromUNIX. The first segment size tbinit tries to acquire is the size of
shared memory, rounded up to the nearest multiple of 2 KB.
Iftbinit cannot acquire a segment this large, it tries to acquire two shared-
memory segments that are each half the size of shared memory.
This “halve the size and double the number” tactic is repeated untiltbinit
acquires enough segments to meet OnLine requirements.
Step 3: Attach to Shared Memory
Next,tbinit attaches the OnLine shared-memory segments to its virtual
address space. Refer topage 2-24 for a detailed explanation of how tbinit
finds and attaches to sharedmemory.
Step 4: Initialize Shared Memory Structure
After attaching to shared memory, thetbinit daemon clears the shared-
memoryspace of uninitialized data. Next tbinit lays out the shared-memory
header information and initializes data in the shared-memory structures.
(For example,tbinit lays out the space needed for the logical log buffer,
initializesthe structures, and links together the three individual buffers that
form the logical log buffer.)
Aftertbinit remaps the shared-memory space, it registers the new starting
addresses and sizes of each structure in the new shared-memory header.