Assume transaction A holds a shared lock R. If transaction B also requests for a shared lock on R, it will
Show Hint
Shared locks allow multiple transactions to read the same resource concurrently, but any exclusive lock or write operation is not allowed until all shared locks are released.
- Option 1: The shared lock is not rejected as both transactions are requesting read access (shared locks), so there is no conflict.
- Option 2: There is no deadlock situation in this scenario. Deadlocks usually happen when one transaction is waiting for a resource held by another transaction in an incompatible mode (like exclusive locks).
- Option 3: Shared locks are not immediately rejected. Multiple transactions can hold shared locks on the same resource.
- Option 4: This is correct. A shared lock allows other transactions to request shared locks on the resource, and it will be granted once transaction A releases the lock.
Therefore, the correct answer is 4. Be granted as soon as it is released by A.