edited by
1,769 views
1 votes
1 votes

Assume transaction $A$ holds a shared lock $R.$ If transaction $B$ also requests for a shared lock on $R.$ It will

  1. result in deadlock situation
  2. immediately be granted
  3. immediately be rejected
  4. be granted as soon as it is released by $A$
edited by

1 Answer

2 votes
2 votes

Shared locks exist when two transactions are granted read access. One transaction gets the shared lock on data and when the second transaction requests the same data it is also given a shared lock. Both transactions are in a read-only mode,

Transaction hold shared lock on data item A .So any number of transaction can read that the data from the requesting item using shared locking .So transaction B request will immediately granted.

So option B is correct.

LOCK SHARED EXCLUSIVE
SHARED YES NO
EXCLUSIVE NO NO

 

Answer:

Related questions

1 votes
1 votes
3 answers
1
1 votes
1 votes
3 answers
2
1 votes
1 votes
1 answer
3
admin asked Apr 1, 2020
887 views
E-R model uses this symbol to represent weak entity set?Dotted rectangleDiamondDoubly outlined rectangleNone of these
1 votes
1 votes
3 answers
4
admin asked Apr 1, 2020
1,015 views
What is the modality of relationship, if there is no explicit need for relationship to occur?ZeroTwoThreeOne