Wednesday, April 2, 2014

Distributed Lock Manager - Concurrency Contorl in Distributed Database



Distributed Lock-Manager Approach

In this approach, the function of lock-manager is distributed over several sites.
[Every DBMS server (site) has all the components like Transaction Manager, Lock-Manager, Storage Manager, etc.]
In Distributed Lock-Manager, every site owns the data which is stored locally.

  • This is true for a table that is fragmented into n fragments and stored in n sites. In this case, every fragment is unique from every other fragment and completely owned by the site in which it is stored. For those fragments, the local Lock-Manager is responsible to handle lock and unlock requests generated by the same site or by other sites.

  • If the data stored in a site is replicated in other sites, then a site cannot own the data completely. In such case, we cannot handle any lock request for a data item stored in a site as the case of fragmented data. If we handle like fragmented data, it leads to inconsistency problems as there are multiple copies stored in several sites. This case can be handled using several protocols which are specifically designed for handling lock requests on replicated data. The protocols are,



Advantages:


  • For replicated data, again the work can be distributed over several sites using one of the above listed protocols.
  • Lock-Manager site is not the bottleneck as the work of lock-manager is distributed over several sites.

Disadvantages:


  • Handling of Deadlock is difficult, because, a transaction T1 which acquired a lock on a data item Q at site S1 may be waiting for lock on another data item R as site S2. This wait is genuine or a deadlock has occurred is not easily identifiable.


Lock handling is done using the regular procedure;
Locks can be granted by the lock-manager if the data item requested is available freely, or locked in a compatible mode.
Granting of locks can be delayed, if the data item is already locked by other transaction in an incompatible mode.




Help Others If You Can

Featured Content

Multiple choice questions in Natural Language Processing Home

MCQ in Natural Language Processing, Quiz questions with answers in NLP, Top interview questions in NLP with answers Multiple Choice Que...

All time most popular contents