T1 holds a shared (S) lock on item X. T2 now requests an exclusive (X) lock on the same item. What happens under standard lock compatibility?
Correct answer B. T2 must wait until T1 releases its shared lock
Explanation
Shared locks are compatible only with other shared locks, so several readers can hold S locks on an item together. An exclusive lock is compatible with nothing, because a writer needs sole access. T2's request conflicts with T1's S lock, so T2 waits. Had T2 asked for another S lock, it would have been granted at once.
Answer checked How we write and check questions
Discussion