System Architecture 2-41
Managing Shared-Memory Resources
Buffer locks ensure process isolation while user processes contend for the
same shared-memory resources. (Refer topage 2-38 for further information
about buffer locks.)
Latchesensure that only one OnLine user process at a time can gain access to
anyone shared-memory resource. (Refer to page 2-41 for further information
about latches.)
Timestamps provide a method of coordinating sequential activity. (Refer to
page 2-44 for further information about timestamps.)
Hashing is a technique that associates a hash table with a frequently used
table. The hash table permits rapid searches through a table to which items
are added unpredictably. (Refer topage 2-46 for further information about
hash tables.)
Shared-Memory Latches
OnLine uses latches to coordinate user processes as they attempt to modify
entries in shared memory. Every modifiable shared-memory resource is
associated with a latch. Before an OnLine user process can modify a shared-
memory resource (such as a table or buffer), it must first acquire the latch
associatedwith that resource. After the user process acquires the latch, it can
modify the resource. When the modification is complete, the user process
releases the latch.
If a user process tries to obtain a latch and finds it held by another user
process,the incoming process must wait for the latch to be released. If more
than one process needs a specific latch, the later processes must wait.
Forexample, two server processes can attempt to access the same slot in the
chunktable, but only one can acquire the latch associated with the table. Only
the process holding the latch can write its entry in the chunk table. The
second process must wait for the latch to be released.
As administrator, you cannot specify the number of latches available. The
numberof latches available within OnLine is fixed, defined by the number of
modi���able shared-memory resources that result from your specific
configuration.
Refer topage 7-97 for information about monitoring latches using tbstat -s.