0
0
DBMS Theoryknowledge~10 mins

Two-phase locking (2PL) in DBMS Theory - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to identify the first phase of Two-phase locking (2PL).

DBMS Theory
In Two-phase locking, the first phase is called the [1] phase where all locks are acquired.
Drag options to blanks, or click blank then click option'
Agrowing
Bshrinking
Ccommitting
Dwaiting
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing the growing phase with the shrinking phase.
2fill in blank
medium

Complete the code to identify the second phase of Two-phase locking (2PL).

DBMS Theory
In Two-phase locking, the second phase is called the [1] phase where all locks are released.
Drag options to blanks, or click blank then click option'
Alocking
Bshrinking
Cwaiting
Dgrowing
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up the names of the two phases.
3fill in blank
hard

Fix the error in the statement about Two-phase locking (2PL).

DBMS Theory
In 2PL, a transaction cannot acquire new locks during the [1] phase after it has started releasing locks.
Drag options to blanks, or click blank then click option'
Ashrinking
Bwaiting
Ccommitting
Dgrowing
Attempts:
3 left
💡 Hint
Common Mistakes
Assuming locks can be acquired after releasing some locks.
4fill in blank
hard

Fill both blanks to complete the definition of strict Two-phase locking.

DBMS Theory
Strict 2PL requires that all [1] locks are held until the [2] of the transaction.
Drag options to blanks, or click blank then click option'
Aexclusive
Bshared
Ccommit
Dstart
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing shared locks with exclusive locks.
Releasing locks before commit.
5fill in blank
hard

Fill all three blanks to complete the explanation of deadlock in 2PL.

DBMS Theory
Deadlock occurs when two transactions [1] locks that the other [2] and neither can [3].
Drag options to blanks, or click blank then click option'
Ahold
Brequests
Cproceed
Drelease
Attempts:
3 left
💡 Hint
Common Mistakes
Thinking deadlock means locks are released.
Confusing 'proceed' with 'release'.