120 likes | 253 Views
Transactions . Concurrency Control. Improved lock-based concurrency with multiple writes. Update Locks. Shared & Exclusive Locks. An Example. 11 steps. Upgrading Locks. Use Shared Locks when reading Upgrade (if possible) to Exclusive Lock when just before writing
E N D
Transactions Concurrency Control
Improved lock-based concurrency with multiple writes Update Locks
An Example 11 steps
Upgrading Locks • Use Shared Locks when reading • Upgrade (if possible) to Exclusive Lock when just before writing • Block if upgrade is denied.
Upgrading Locks 9 steps!
Deadlocks A new lock called the Update Lock (UL). Similar to a Shared Lock except only UL can be upgraded. Not symmetrical!
Improved lock-based concurrency with hierarchical data Hierarchical locking
Multiple Granularities • Relations • Blocks • Tuples
Intention Locks • Represented as IS for intention to share a descendant, and IX for intention to write a descendant. • Acquire an intention lock on the parentbefore acquiring any lock on a child.
Rules • Intention-lock the parents before using SL or XL on an element. • If at the element to lock, request a lock.