1. Manuals
  2. Brands
  3. Computer Equipment
  4. Server
  5. IBM
  6. Computer Equipment
  7. Server

IBM 000-8697 Step 2: Calculate Shared-Memory Key Value, Steps 3 and 4: Request Shared-Memory Segment and Attach to SHMBASE

1 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 702
Download on canonical page 702 pages, 4.15 Mb
System Architecture 2-25
How User Processes Attach to Shared Memory
Step 2: Calculate Shared-Memory Key Value
Whena user process is ready to attach to shared memory,it calculates a value
that serves as the shared-memory key to identify toUNIX the first shared-
memory segment. To ensure that all user processes within a single OnLine
system attach to the same shared-memory segments, the key value must be
shared among all OnLine user processes. To ensure that the user processes
fromindependent OnLines do not become entangled, the key value must be
unique for each OnLine system.
Theshared-memory key value that each user process arrives at is defined by
the calculation:
(SERVERNUM * 65536) + shmkey
The database configuration parameterSERVERNUM uniquely identifies the
shared-memorysegments for each OnLine system. If more than one OnLine
databaseserver exists on a single host machine, the calculated key values are
separated by the difference between the two values ofSERVERNUM, multi-
plied by 65536.
Thevalue of shmkey is set internally and cannot be changed by the user. (The
shmkey value is 52564801 in hexadecimal representation or 1,381,386,241 in
decimal.)
Thevalue (SERVERNUM *65536) is the same as multiplying SERVERNUM by
hexadecimal 1000.
Steps 3 and 4: Request Shared-Memory Segment and Attach toSHMBASE
Theuser process transfers to UNIX the calculated shared-memory key value.
In return, theUNIX operating system passes back the shared-memory
segment identifier associated with the value of the shared-memory key.
Using this identifier, the user process requests that the operating system
attach this segment of shared memory to the user process space at the
address specified as the OnLine configuration parameterSHMBASE.
MENU

Models

Contents