| Multiple Granularity Locking |
Article Index for Multiple |
Website Links For Multiple |
Information AboutMultiple Granularity Locking |
| CATEGORIES ABOUT MULTIPLE GRANULARITY LOCKING | |
| concurrency control | |
|
In MGL, locks are set on objects that contain other objects. MGL exploits the hierarchical 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. 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. LOCK MODES 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). MGL locking modes are compatible with each other as defined in the following matrix. |
|
|