GATE CS 2024 Set 2 — Question 27
Go beyond PYQs with Success TrackerAI-powered personalised practice and doubt support. Unlimited practice on eligible plans; AI usage limits apply.MSQ+1 / -0MediumTwo-Phase LockingTransactions & ConcurrencyDatabases
Databases → Transactions & Concurrency → Two-Phase Locking
Last updated
Question
Which of the following statements about the Two Phase Locking (2PL) protocol is/are TRUE?
Correct answer
(A) 2PL permits only serializable schedules; (C) With 2PL, once a lock is released on any data item inside a transaction, no more locks on any data item can be obtained inside that transaction; (D) A deadlock is possible with 2PL
Solution
(A) TRUE: The Two Phase Locking (2PL) protocol guarantees conflict serializability. Any schedule allowed by 2PL is serializable.
(B) FALSE: This statement describes a locking strategy that does not follow the two-phase rule. In 2PL, a transaction must acquire all necessary locks (Growing Phase) before it releases any lock. It cannot release a lock "just after the operation" if it intends to acquire more locks later.
(C) TRUE: This is the definition of the Shrinking Phase in 2PL. Once a transaction releases a lock, it enters the shrinking phase and cannot acquire any new locks.
(D) TRUE: 2PL does not prevent deadlocks. Transactions can wait for each other in a cycle (e.g., T1 holds A and waits for B, T2 holds B and waits for A) while adhering to 2PL rules.
(B) FALSE: This statement describes a locking strategy that does not follow the two-phase rule. In 2PL, a transaction must acquire all necessary locks (Growing Phase) before it releases any lock. It cannot release a lock "just after the operation" if it intends to acquire more locks later.
(C) TRUE: This is the definition of the Shrinking Phase in 2PL. Once a transaction releases a lock, it enters the shrinking phase and cannot acquire any new locks.
(D) TRUE: 2PL does not prevent deadlocks. Transactions can wait for each other in a cycle (e.g., T1 holds A and waits for B, T2 holds B and waits for A) while adhering to 2PL rules.
Continue learning with Success Tracker
A step still unclear? Work through it with support
Use Success Tracker to ask about the reasoning, then try another GATE CS question to check your understanding.
AI-powered practice· Unlimited practice on eligible plans
- PYQs with solutions
- Attempt available previous-year questions, then compare your reasoning with the worked solution. Coverage varies by stream.
- Practice that adapts
- Choose a topic, work on weaker areas and bookmark questions to revisit. Your attempts feed your progress tracking.
- AI doubt support
- Ask follow-up questions about a step or concept while practising, instead of stopping at the final answer.
Unlimited practice is available on eligible plans. Free practice and AI usage have limits; check the current plan allowances before choosing.
This page stays readable without an account. AI responses can be wrong; check them against the solution and source material.
More questions on Transactions & Concurrency
2026 Set 2 Q15In the context of DBMS, consider the two sets T and S given below. | T | S | |---|---| | I:…2026 Set 2 Q20Consider concurrent execution of two transactions and in a DBMS, both of which access a…2026 Set 1 Q30Let and be the attributes of a relation in a relational schema. Let…2026 Set 1 Q31In the context of relational database normalization, which of the following statements is/are true?2026 Set 2 Q42In the context of schema normalization in relational DBMS, consider a set F of functional…