Two phase locking (2pl), Database Management System

Two Phase Locking (2PL)

The two-phase locking protocol having of two phases:

Phase 1: The lock acquisition phase: If a transaction T needs to read an object, it wants to obtain the S (shared) lock. If T needs to modify an object, it wants to obtain X (exclusive) lock. No conflicting locks are granted to a transaction. New locks on items can be obtained but no lock can be released till all the locks needed by the transaction are obtained.

Phase 2: Lock Release Phase: The existing locks can be released in any order but no new lock can be obtained after a lock has been released. The locks are held only till they are needed.

Normally the locks are taken by the DBMS. Any legal schedule of transactions that follows 2 phase locking protocol is sured to be serialisable. The 2 phase locking protocol has been confirmed for it correctness. Though, the proof of this protocol is beyond the scope of this Unit. You can refer to more readings for more details on this protocol.

 

Posted Date: 3/12/2013 2:40:08 AM | Location : United States







Related Discussions:- Two phase locking (2pl), Assignment Help, Ask Question on Two phase locking (2pl), Get Answer, Expert's Help, Two phase locking (2pl) Discussions

Write discussion on Two phase locking (2pl)
Your posts are moderated
Related Questions
Write short note on Events Events consist of inputs, interrupts, decisions and actions performed by any external device or users. Every event always has a sender and receiver.

Drawbacks of Data Distribution: The primary drawbacks of distributed database systems are the added complexity needed to ensure proper coordination between the sites. This increas

Shared lock or Read Lock It is requested by a transaction that needs to just read the value of data item. A shared lock on a data item does not permit an exclusive lock

Explain the θ-join and equijoin Refer tables Car and Boat which list models of cars and boats and their relevant prices. Assume a customer wants to buy a car and a boat, but sh

In which format database schema is written ? Data base schema is written in the DDL format.

Consider entity type Employee with attributes empNumber (this is unique), empName, and the year when he/she was hired. An employee can either be a technical employee, a marketing e

Example : Search the name, department number and salary of employees drawing minimum salary in that department. SELECT ENAME, SAL, DEPTNO  FROM EMP WHERE SAL IN (SELECT MI

Explain the EXEC statement in SQL  Ans: All statements which start with EXEC SQL are embedded SQL database statements. High level languages such as C can be employed to write a


Data Base Management System 1. Draw the Architecture of MySQL and explain about its subsystems briefly. 2. Elaborate with the help of an example the concept of Primary key a