Question 51

If transaction A holds a shared lock R and if transaction B also requests for a shared lock on R, it will

  1. AResult in a deadlock situation
  2. BImmediately be granted
  3. CImmediately be rejected
  4. DBe granted as soon as it is released by A
Show answerHide answer

Correct answer: (B) Immediately be granted

Explanation

Shared (read) locks are compatible with each other, so B's shared-lock request on R is granted immediately.

From DSSSB TGT Computer Science Practice Set 2

This is question 51 of DSSSB TGT Computer Science Practice Set 2. See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.