0% found this document useful (0 votes)
2K views1 page

Multiple Granularity Locking

Multiple granularity locking is a locking method used in database management systems that locks objects in a hierarchical manner based on containment relationships. It uses intention shared and intention exclusive locks in addition to shared and exclusive locks. Transactions lock ancestors of a node with intention locks so that other transactions cannot access the ancestors in conflicting modes. MGL with non-strict two-phase locking guarantees serializability and uses lock escalation to determine the granularity of locks on a node and its ancestors.

Uploaded by

Shalini Asija
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2K views1 page

Multiple Granularity Locking

Multiple granularity locking is a locking method used in database management systems that locks objects in a hierarchical manner based on containment relationships. It uses intention shared and intention exclusive locks in addition to shared and exclusive locks. Transactions lock ancestors of a node with intention locks so that other transactions cannot access the ancestors in conflicting modes. MGL with non-strict two-phase locking guarantees serializability and uses lock escalation to determine the granularity of locks on a node and its ancestors.

Uploaded by

Shalini Asija
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Multiple granularity locking - Definition

In computer science, multiple granularity locking (MGL), sometimes called the John Rayner locking method, is a
locking method used in database management systems (DBMS) and relational databases.

In MGL, locks are set on objects that contain other objects. MGL exploits the hierarchial nature of the contains relationship.
For example, a database may have files, which contain pages, which contain records. This can be thought of as a tree of
objects, where each node contains its children. A lock locks a node and its descendants.

In addition to shared (S) locks and exclusive (X) locks from other locking schemes, like Strict two-phase locking, MGL also
uses intention shared and intention exclusive locks. IS locks conflict with X locks, while IX locks conflict with S and X
locks.

To lock a node in S (or X), MGL has the transaction locks all of its ancestors with IS (or IX), so if a transaction locks a node
in S (or X), no other transaction can access its ancestors in X (or S and X).

Multiple granularity locking is usually used with Non-strict two-phase locking to guarantee serializability. MGL uses lock
escalation to determine granularity lock on a node and its ancestors.

You might also like