Which of the following problem(s) can occur in the Strict Two-Phase Locking…
2024
Which of the following problem(s) can occur in the Strict Two-Phase Locking (Strict 2PL) protocol?
- A.
Chances of deadlock
- B.
Cascading Rollback
- C.
Neither 1 nor 2
- D.
Both 1 & 2
- E.
Question not attempted
Attempted by 366 students.
Show answer & explanation
Correct answer: A
Two-phase locking (2PL) protocol ensures serializability by dividing transaction execution into two phases: a growing phase (acquiring locks) and a shrinking phase (releasing locks).
In Strict Two-Phase Locking (Strict 2PL), all exclusive locks are held until the transaction commits or aborts.
One major issue with Strict 2PL is deadlock. Deadlock occurs when two or more transactions are waiting for each other to release locks, resulting in a standstill. For example, if transaction T1 holds a lock on resource R1 and waits for R2, while T2 holds a lock on R2 and waits for R1, neither transaction can proceed.
Cascading rollback is not a problem in Strict 2PL. Since exclusive locks are not released until commit or abort, no other transaction can read uncommitted data. Therefore, cascading rollbacks are prevented.
Hence, the primary problem associated with Strict 2PL is deadlock, while cascading rollback does not occur under Strict 2PL.
Therefore, the correct answer is: Chances of deadlock.