Two phase locking (2pl), Database Management System

Assignment Help:

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.

 


Related Discussions:- Two phase locking (2pl)

Primary and foreign key, Primary Key The primary key is the candidate k...

Primary Key The primary key is the candidate key that is selected by the database designer as the principal denotes of identifying entities within an entity set. The left candi

Oracle, Extend your CREATE TABLE statement from problem 3 with referential ...

Extend your CREATE TABLE statement from problem 3 with referential integrity constraints. Updates and deletes on related rows are restricted. 6. From examination of the sample data

Using sql create a view rs for the relations r and s, Using SQL create a vi...

Using SQL create a view RS for the relations R and S. The view consists of the columns A and D renamed as X and Y in that order. Insert a tuple into it. Show the contents of t

Explain the disadvantages of creating a temporary table, Explain the disadv...

Explain the disadvantages of creating a temporary table? If you have already created a temporary table with a shown name and attempting to create a second one with that nam

Explain the data access protocol, (a) Explain the three types of potentia...

(a) Explain the three types of potential mistake which could occur if concurrency control is not properly enforced in the database system. Support your answer with appropriate ex

Column constraints-on delete cascade, CREATE TABLE prodtrans ( pno ...

CREATE TABLE prodtrans ( pno number (4) ptype char (1) CHECK (ptype in ('I','R','S')), qty number (5) FOREIGN KEY pno REFERENCES product (pno) ON DELETE CASCADE);

Explain dml with some examples, Explain DML with some examples? DML - D...

Explain DML with some examples? DML - Data Manipulation Language: statements used for managing data within schema objects. Some examples: • SELECT - retrieve data from the a da

What is log shipping, What is Log Shipping? Log shipping is the method ...

What is Log Shipping? Log shipping is the method of automating the backup of database and transaction log files on a production SQL server, and then restoring them onto a stand

Delete - referential integrity, During the deletion of a tuple two cases ca...

During the deletion of a tuple two cases can happen: Deletion of tuple in relation having the foreign key: In this type of case simply delete the desired tuple. For example, in

What are the types of reference, What are the types of reference?explain it...

What are the types of reference?explain it with suitable examples? Object oriented language given the ability to refer the object attribute of the type can be referred to the s

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd