O'Reilly logo

Oracle Parallel Processing by Sanjay Mishra, Tushar Mahapatra

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Parallel Cache Management

The instance locks that manage consistency among copies of objects in the buffer caches of multiple instances are called PCM (Parallel Cache Management) locks. Parallel Cache Management ensures that an instance reads from, or writes to, only the latest copy of a block. PCM locks protect blocks in datafiles. These blocks include data blocks, index blocks, rollback segment blocks, and segment headers.

An instance must acquire a PCM lock on a block before reading or modifying it. Acquiring a PCM lock may result in a lock mode conversion as shown in Table 8.2. One PCM lock can protect one or more database blocks. However, only one lock is needed to protect a data block.

Pinging

When there is contention for the same block by multiple instances, one instance has to write the block to disk so that the other instances can read or modify it. This process is referred to as pinging . The concept of pinging in OPS is best explained through an example. Let’s look at what happens in a two-instance OPS configuration in which instance 1 is updating row 1 of a table that resides in block 1. Let’s assume that block 1 is protected by PCM lock L1. Instance 1 acquires lock L1 in exclusive mode. Then instance 1 reads block 1 from the datafile on disk, places that block in its buffer cache, and modifies it. For the other instance, instance 2, the mode of lock L1 is NULL, indicating that it does not have access rights to block 1 at this time.

Now, if instance 2 needs to modify row ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required