omana
Uploaded by
12 SLIDES
260 VUES
120LIKES

Enhancing Lock-Based Concurrency Control: Strategies for Multiple Writes

DESCRIPTION

This guide outlines an improved lock-based concurrency control model that accommodates multiple write operations efficiently. It introduces key concepts such as shared and exclusive locks, update locks, and hierarchical locking with multiple granularities. You will learn how to effectively manage lock upgrades, how to prevent deadlocks, and the importance of intention locks. Step-by-step instructions are provided, emphasizing the correct acquisition of locks to maintain data integrity in concurrent environments. Perfect for developers seeking to optimize database performance.

1 / 12

Télécharger la présentation

Enhancing Lock-Based Concurrency Control: Strategies for Multiple Writes

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Transactions Concurrency Control

  2. Improved lock-based concurrency with multiple writes Update Locks

  3. Shared & Exclusive Locks

  4. An Example 11 steps

  5. Upgrading Locks • Use Shared Locks when reading • Upgrade (if possible) to Exclusive Lock when just before writing • Block if upgrade is denied.

  6. Upgrading Locks 9 steps!

  7. Deadlocks A new lock called the Update Lock (UL). Similar to a Shared Lock except only UL can be upgraded. Not symmetrical!

  8. Example

  9. Improved lock-based concurrency with hierarchical data Hierarchical locking

  10. Multiple Granularities • Relations • Blocks • Tuples

  11. 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.

  12. Rules • Intention-lock the parents before using SL or XL on an element. • If at the element to lock, request a lock.

More Related