Which of the following best describes the two phases in the Two-Phase Locking (2PL) protocol?
Think about when locks can be obtained and when they must be released in 2PL.
In 2PL, the growing phase is when a transaction can acquire locks but cannot release any. The shrinking phase is when it releases locks but cannot acquire new ones.
What is the main guarantee provided by the Two-Phase Locking protocol regarding transaction execution?
Consider what serializability means for concurrent transactions.
2PL ensures that the schedule of transactions is serializable, meaning the outcome is equivalent to some serial order of execution.
Which statement correctly describes deadlock behavior in strict Two-Phase Locking?
Think about how holding locks until commit affects waiting between transactions.
Strict 2PL holds all locks until commit, so transactions may wait for each other indefinitely, causing deadlocks.
What is the key difference between basic Two-Phase Locking and Strict Two-Phase Locking?
Consider when exclusive locks are released in both protocols.
Strict 2PL requires exclusive locks to be held until commit to ensure recoverability, while basic 2PL releases locks in the shrinking phase.
What is the likely consequence if a transaction releases a lock and then later tries to acquire another lock in Two-Phase Locking?
Recall the rule about acquiring and releasing locks in 2PL phases.
Acquiring locks after releasing any violates the growing phase rule, breaking 2PL and risking schedules that are not serializable.