Database Reference
In-Depth Information
x$kjirft / x$kjbr structures
Converting
Queue (Waiters)
Granted
Queue (Holders)
Resource
[0xb6dff3][0x0],[TM]
Locks
Locks
x$kjbl / x$kjilkft
lock structures
Locks
Figure 11-1. Resources and locks in GRD
Figure 11-1 shows locks and resources for both Ges structures and Global Cache services (GCs) structures.
Internally, GCs manages cache fusion-related resources. GCs resources are externalized in x$kjbr fixed table, GCs locks
are externalized in x$kjbl fixed table, Ges resources are externalized in x$kjirft, and Ges locks are externalized in x$kjilkft
table. there are a few more structures implementing resources and locks too.
Note
GRD is distributed among active instances of a database. For example, if there are three active instances, then
one-third of GRD is resident in each instance. As resources and locks are integral components of GRD, resources are
also distributed among active instances, and an instance is assigned to be the resource master; essentially, a resource
master keeps track of the state of the resource at any given time. As searching for a resource in all instances will be
cost-prohibitive, by employing the resource mastering scheme, search for a resource is optimized. Essentially, locking
a resource has three steps: identify the resource master instance; request for locks on that resource to the resource
master instance; and then the resource master instance grants lock or adds the request to the converting queue.
The following is an elaboration of these steps:
1.
Identify the master instance of a resource using the resource name. Typically, a variant of
hash function is applied on the resource name to identify the master instance.
2.
Send a message to resource master instance to acquire a lock on the resource. If the
resource is available, then the remote instance will allocate a locking structure and
associate the locking structure to the granted queue of that resource. A message is sent
back to the requesting process with a grant. This action implies that requested process
now holds a lock on that resource.
3.
If the resource is not available, then the resource master instance will allocate a locking
structure and associate the locking structure to the converting queue. A process in the
converting queue waits for the resource to be available.
 
 
Search WWH ::




Custom Search