in Databases
363 views
0 votes
0 votes

IS THE GIVEN ANS RIGHT?

in Databases
363 views

1 Answer

0 votes
0 votes
absolutely ,

Not that in 2PL protocol
1) Growing phase => Obtain locks

2) Shrinking phase => Realease the locks

By using the 2PL will definetly get serialability schedule
by

4 Comments

In option C, My doubt is in why data didn't effect until all locks get... Suppose item A is modified when it is lock by T1, after sometime item B locked by T1 then it is also can  change by T1
0
0
edited by
see , there are two types of Lock

shared lock --- >  read lock

exclusive lock --- >  write lock

if your data item is already locked under shared mode then someone else can request for share lock and they can get it

now ,  if we locked the data item in shared mode then someone else cannot lock it under exclusive Mode because there will be Read - Write confict

but If we locked the data item in exclusive mode then someone else cannot lock it under exclusive or shared mode .

 

So until the "  lock point"  No other transaction can modified the data item and therefore , data items not get effected till  lock point ,  after lock point T1 realses all it's lock and unlock all it's  Keys then If  T2 wants to write and modified the data it will get the key , before the locking point , Transaction T2 not get the key to modied of do any kind of changes in any data item but it's only capable to read the data item
0
0
@magma

you have have not given the answer what is shaik masthan is asking please read the shaik masthan comment again and clear that doubt i have same doubt
0
0

Related questions