Download presentation
Presentation is loading. Please wait.
1
Chapter 4 Transaction Management Title: Granularity of Locks and Degrees of Consistency in a Shared Database Authors: J.N. Gray, R.A. Lorie, G. R. Putzolu and I. L. Traiger Presenter: Stuart Ness
2
2 Outline Motivation Problem Definition Contributions Key Concepts Validation Methodology Assumptions Rewrite Changes
3
3 Motivation Concurrent Transactions Existing Locking mechanisms Overhead large-granularity locking Alternatives to existing techniques Finer-granularity Less overhead
4
4 Problem Definition Given Shared Database Need for Concurrent Processing Find – Efficient DBMS Lock method Inherent Locking mechanism Fine Granularity locks Objectives Efficiency Low Overhead Constraints Hierarchical Database Systems
5
5 Contributions Produces a technique for the implicit locking of an entire sub-tree Introduce an intention mode to tag ancestors to prevent explicit or implicit exclusive or share modes (allows for implicit locking) Implements a method that allows for fine granularity without drastically increasing overhead (implicit locking)
6
6 Concepts Granularity of locks (Hierarchical Lock structure) Lock Modes Exclusive Mode (X) Share Mode (S) Intention Share Mode (IS) Intention Exclusive Mode (IX) Share and Intention Exclusive mode (SIX) Database Area 1Area 2 File AFile BFile C Record Q Record R Record S Record T Record U Record V Record W
7
7 Concepts Compatibility between access modes Protocol for requesting node locks – root to leaf Leaf nodes are never requested in intention mode No X YesSIX No YesNoYesS No Yes IX NoYes IS XSIXSIXIS Example of locking for record R 1. Lock data-base mode IS 2. Lock area containing Rmode IS 3. Lock file containing Rmode IS 4. Lock Record Rmode S
8
8 Concepts Implicit locking (Ancestor based locking) Directed Acyclic Graphs (DAG)– (non- hierarchical lock / indices) Access via file (sequential) Access via index (associative) Example of implicit locking for File F 1. Lock data-base mode IS 2. Lock area containing Fmode IS 3. Lock file Fmode S 4. All Records in F implicit mode S Database Area 1 File FIndex I Record R Record Q Example of implicit locking for Index I 1. Lock data-base mode IS 2. Lock area containing Imode IS 3. Lock Index Imode S 4. All Records in I implicit mode S
9
9 Concepts Dynamic Locks Index interval locks – index based on value Extends DAG adding a lock on the index intervals. (If moving from one index interval to another, it requires both) Scheduling and Granting Requests Coexisting requests per group Conversion modes Request higher permissions Deadlock due to higher permission requests
10
10 Validation Methodology Content primarily presents informal theory Validated while being developed and implemented on IBM Research Lab System Shows benefits of working system / Proof of concept Some of the modes have been applied in the IMS/VS system Lacks formal proof
11
11 Assumptions Database can be broken into some fashion of a hierarchical form Assumes the use of an early database model (a simple hierarchical or directed graph). This assumption does not allow for transcending to all DB types without additional effort (relational and structured, etc) Assumes limited was of accessing data. More Complex methods may complicate locking mechanism and add inefficiencies.
12
12 Rewrite Changes Rewrite to reflect the current state of database systems (as article is from 1975) Add statistical evidence of tradeoffs between overhead and concurrency Preserve the notion of intention modes and the scheduling of blocking non-compatible modes. Within the dynamic scheduling, consider using some type of enhanced queue.
13
13 Questions?
14
14 Additional References SQL Server http://www.awprofessional.com/articles/article.asp? p=26890&seqNum=4&rl=1 http://www.awprofessional.com/articles/article.asp? p=26890&seqNum=4&rl=1 http://media.wiley.com/product_data/excerpt/5X/07 645795/076457955X.pdf http://media.wiley.com/product_data/excerpt/5X/07 645795/076457955X.pdf Oracle Locking Levels http://www.akadia.com/services/ora_locks_survival _guide.html http://www.akadia.com/services/ora_locks_survival _guide.html
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.