How virtual processors attach to shared memory
The database server virtual processors attach to shared memory during setup.
During this process, the database server must satisfy the following
two requirements:
- Ensure that all virtual processors can locate and access the same shared-memory segments
- Ensure that the shared-memory segments are located in physical memory locations that are different than the shared-memory segments assigned to other instances of the database server, if any, on the same computer
The database server uses two configuration parameters, SERVERNUM and SHMBASE, to meet these requirements.
When a virtual processor attaches to shared memory, it performs
the following major steps:
- Accesses the SERVERNUM parameter from the onconfig file
- Uses SERVERNUM to calculate a shared-memory key value
- Requests a shared-memory segment using the shared-memory key value
The operating system returns the shared-memory identifier for the first shared-memory segment.
- Directs the operating system to attach the first shared-memory segment to its process space at SHMBASE
- Attaches additional shared-memory segments, if required, to be contiguous with the first segment
The following topics describe how the database server uses the values of the SERVERNUM and SHMBASE configuration parameters in the process of attaching shared-memory segments.