
System Architecture 2-41
Managing Shared-Memory Resources
Buffer locks ensure process isolation while user processes contend for the
same shared-memory resources. (Refer to page 2-38 for further information
about buffer locks.)
Latchesensurethatonly one OnLine userprocessat a timecangainaccessto
anyoneshared-memoryresource.(Refertopage 2-41forfurtherinformation
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 to page 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
associated with thatresource. After theuser 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.
For example, two server processes can attempt to access the same slot in the
chunktable,butonlyonecanacquirethelatchassociatedwiththetable.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
numberoflatchesavailablewithinOnLineisfixed,definedbythenumberof
modifiable shared-memory resources that result from your specific
configuration.
Refer to page 7-97 for information about monitoring latches using tbstat -s.
Comentarios a estos manuales