As we know the prime problems with Lock Based Protocol has been avoiding Deadlocks and ensuring a Strict Schedule. We’ve seen that Strict Schedules are possible with following Strict or Rigorous 2-PL. We’ve even seen that Deadlocks can be avoided if we follow Conservative 2-PL but the problem with this protocol is it cannot be used practically. Graph Based Protocols are used as an alternative to 2-PL. Tree Based Protocols is a simple implementation of Graph Based Protocol.
A prerequisite of this protocol is that we know the order to access a Database Item. For this we implement a Partial Ordering on a set of the Database Items (D) {d1, d2, d3, ….., dn} . The protocol following the implementation of Partial Ordering is stated as-
Tree Based Protocol
Following the Tree based Protocol ensures Conflict Serializablity and Deadlock Free schedule. We need not wait for unlocking a Data item as we did in 2-PL protocol, thus increasing the concurrency.
Now, let us see an Example, following is a Database Graph which will be used as a reference for locking the items subsequently.
Database Graph
Let’s look at an example based on the above Database Graph. We have three Transactions in this schedule and this is a skeleton example, i.e, we will only see how Locking and Unlocking works, let’s keep this simple and not make this complex by adding operations on data.
From the above example, first see that the schedule is Conflict Serializable. Serializablity for Locks can be written as T2 → T1 → T3.
Data items Locked and Unlocked are following the same rule as given above and follows the Database Graph.
Thus, let’s revise once more what are the key points of Graph Based Protocols.
Advantage
Disadvantage
Overall this protocol is mostly known and used for its unique way of implementing Deadlock Freedom.
62 videos|66 docs|35 tests
|
1. What is a graph-based concurrency control protocol in DBMS? |
2. How does the graph-based concurrency control protocol GATE work? |
3. What are the advantages of the graph-based concurrency control protocol GATE? |
4. How does the graph-based concurrency control protocol GATE handle conflicts between transactions? |
5. Is the graph-based concurrency control protocol GATE suitable for real-time database systems? |
|
Explore Courses for Computer Science Engineering (CSE) exam
|