IBM 000-8697 Manual Do Utilizador

Página de 702
2-12
IBM Informix OnLine Database Server Administrator’s Guide
What Happens During Shared-Memory Initialization
The tbinit process uses the configuration values to calculate the required size
of OnLine shared memory.
Step 2: Create Shared Memory
After tbinit finishes computing the configuration values, it forks a child
process, which becomes the tbinit daemon. From this point on, the child
(daemon) process performs the initialization tasks. The parent process sleeps
until the child wakes it.
The tbinit daemon creates shared memory by acquiring the shared-memory
space from
UNIX
. The first segment size tbinit tries to acquire is the size of
shared memory, rounded up to the nearest multiple of 2 KB.
If tbinit 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 until tbinit
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 to
finds and attaches to shared memory.
Step 4: Initialize Shared Memory Structure
After attaching to shared memory, the tbinit daemon clears the shared-
memory space 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,
initializes the structures, and links together the three individual buffers that
form the logical log buffer.)
After tbinit remaps the shared-memory space, it registers the new starting
addresses and sizes of each structure in the new shared-memory header.