50.3k views
4 votes
A deadlock occurs when two users hold shared locks on portions of a table that are needed to complete the transaction of the other user.

a) True
b) False

User Bertran
by
7.4k points

1 Answer

3 votes

Final answer:

The statement about deadlocks and shared locks is false. Deadlocks occur when multiple transactions wait for each other to release locks without any willing to do so, leading to a standstill.

Step-by-step explanation:

The statement that a deadlock occurs when two users hold shared locks on portions of a table that are needed to complete the transaction of the other user is false

A deadlock typically occurs in a database when two or more transactions are waiting for each other to release locks, without a transaction willing to release its lock. Consider this example where Transaction 1 has a lock on Resource A and needs to lock Resource B to complete, but Transaction 2 has a lock on Resource B and needs to lock Resource A to complete. Neither transaction can proceed, and a deadlock occurs.

User Nohup
by
7.0k points