Skip to content
ExamHope Logo

examhope

Primary Menu
  • Digital Logic
    • Arithmetic Operations
    • Asynchronous/Ripple Counters
    • Basic Gates
    • Boolean Algebraic Theorems
    • Codes
  • Data Structures
    • Binary Heaps
    • Binary Search
    • Binary Search Trees
    • Binary Tree
    • Binary Tree Sort
    • Bipartite Graphs
    • Complete Graph
  • Theory of Computation
    • Finite Automata
    • Finite Automaton First Example
  • Current Affairs
    • Sports News
    • Tech News
    • Bollywood News
    • Daily News
  • Database
  • Computer Network
  • Computer Organization and Architecture
  • C Language
  • Operating Systems
  • Software Engineering
  • Theory of Computation
  • About us
  • Contact Us
  • Privacy Policy
  • DMCA Policy
  • Terms and Conditions
  • Home
  • IT
  • Locking Protocols MCQs for database systems (GATE level)
  • IT
  • Database
  • Locking Protocols

Locking Protocols MCQs for database systems (GATE level)

examhopeinfo@gmail.com October 9, 2025 20 minutes read
Locking Protocols

Locking Protocols

Locking Protocol MCQs

The topics will cover:

  • Two-Phase Locking (2PL): basic, strict, rigorous
  • Deadlocks and conflict serializability
  • Shared (S) and Exclusive (X) locks
  • Deadlock prevention and detection
  • Lock compatibility
  • Timestamp ordering and locking conflicts

Locking Protocol MCQs

Q1

Schedule: T1: r(A) w(B) , T2: r(B) w(A) with 2PL protocol.
What type of lock conflict can occur?
A. Deadlock
B. Non-recoverable schedule
C. Cascading abort
D. None

โœ… Answer: A
Solution:

  • T1 locks A, T2 locks B.
  • T1 waits for B, T2 waits for A โ†’ circular wait โ†’ deadlock.

Q2

Which of the following ensures conflict serializability?
A. No locking
B. Two-Phase Locking (2PL)
C. Random scheduling
D. Ignoring locks

โœ… Answer: B
Solution:

  • 2PL protocol ensures all locks are acquired before release phase โ†’ conflict serializable.

Q3

Which type of 2PL locks all exclusive locks until commit?
A. Basic 2PL
B. Strict 2PL
C. Rigorous 2PL
D. Deadlock 2PL

โœ… Answer: B
Solution:

  • Strict 2PL: Exclusive (X) locks are held until commit โ†’ prevents cascading aborts.

Q4

In shared (S) and exclusive (X) locking, which is true?
A. S locks are compatible with X locks
B. X locks are compatible with X locks
C. S locks are compatible with S locks
D. None

โœ… Answer: C
Solution:

  • Multiple transactions can read โ†’ S locks compatible with S locks.
  • X locks conflict with all โ†’ exclusive access.

Q5

Schedule: T1: r(A) w(B) c1, T2: w(A) r(B) c2 under 2PL.
Can deadlock occur?
A. Yes
B. No
C. Only if T1 aborts
D. Only if T2 aborts

โœ… Answer: A
Solution:

  • T1 locks A, T2 locks B โ†’ T1 waits for B, T2 waits for A โ†’ deadlock.

Q6

Which of these prevents deadlocks?
A. Wait-die
B. Wound-wait
C. Timestamp ordering
D. All of the above

โœ… Answer: D
Solution:

  • All three are deadlock prevention/detection schemes in locking protocols.

Q7

Which 2PL variant releases all locks after commit?
A. Basic 2PL
B. Strict 2PL
C. Rigorous 2PL
D. Cascading 2PL

โœ… Answer: C
Solution:

  • Rigorous 2PL: all locks (S and X) are held until commit โ†’ ensures conflict serializability and strict recoverability.

Q8

Which of the following can still allow cascading aborts?
A. Basic 2PL
B. Strict 2PL
C. Rigorous 2PL
D. None

โœ… Answer: A
Solution:

  • Basic 2PL releases some locks before commit โ†’ other transactions may read uncommitted values โ†’ cascading aborts possible.

Q9

Schedule: T1: r(A) w(A), T2: r(A) w(A) under Strict 2PL.
If T1 commits first, can T2 proceed?
A. Yes, after T1 releases locks
B. No
C. Only if T2 aborts
D. Immediately

โœ… Answer: A
Solution:

  • Strict 2PL: X locks held until commit. T2 waits until T1 releases โ†’ safe.

Q10

Which locks are compatible with shared locks (S)?
A. X locks
B. S locks
C. Both S and X
D. None

โœ… Answer: B
Solution:

  • S locks allow concurrent reads.
  • X locks conflict โ†’ cannot coexist with S.

Q11

Deadlock occurs in 2PL when:
A. A transaction never requests locks
B. Circular wait exists among transactions
C. Transactions commit immediately
D. No writes occur

โœ… Answer: B
Solution:

  • Circular wait for locks among transactions โ†’ deadlock.

Q12

T1 holds S(A), T2 requests X(A). Which occurs?
A. T2 waits
B. T1 aborts
C. Deadlock
D. T2 proceeds immediately

โœ… Answer: A
Solution:

  • X lock conflicts with S โ†’ T2 waits until T1 releases S(A).

Q13

Which variant of 2PL prevents cascading aborts?
A. Basic 2PL
B. Strict 2PL
C. Rigorous 2PL
D. Both B and C

โœ… Answer: D
Solution:

  • Strict and rigorous 2PL hold X locks until commit โ†’ no cascading aborts.

Q14

Schedule: T1: r(A) w(B) c1, T2: r(B) w(A) c2 using Timestamp ordering.
Conflict?
A. T1 may wait
B. T2 may abort
C. Deadlock possible
D. Both A and B

โœ… Answer: D
Solution:

  • Timestamp ordering may make T1 wait or abort T2 depending on timestamps โ†’ ensures serializability without deadlock.

Q15

T1 requests X(A), T2 requests X(A). Which occurs under Strict 2PL?
A. Both proceed
B. T2 waits
C. Deadlock
D. T1 aborts

โœ… Answer: B
Solution:

  • T1 holds X(A) โ†’ T2 must wait until T1 commits/releases โ†’ no deadlock yet.

Q16

Which of these is not a property of 2PL?
A. Conflict serializability
B. Cascading abort prevention
C. Deadlock prevention
D. Two phases: growing and shrinking

โœ… Answer: C
Solution:

  • 2PL guarantees conflict serializability, but deadlocks can occur โ†’ deadlock prevention is not inherent.

Q17

If T1 holds S(A), T2 requests S(A), T3 requests X(A):
Which can proceed?
A. T2
B. T3
C. Both
D. None

โœ… Answer: A
Solution:

  • Multiple S locks compatible โ†’ T2 can proceed.
  • X lock request (T3) waits until S locks released.

Q18

In 2PL, the shrinking phase is when:
A. Locks are acquired
B. Locks are released
C. Transactions commit
D. Locks are ignored

โœ… Answer: B
Solution:

  • Shrinking phase โ†’ transaction releases locks.
  • Growing phase โ†’ transaction acquires locks.

Q19

Which protocol is more strict than Strict 2PL?
A. Basic 2PL
B. Rigorous 2PL
C. Timestamp ordering
D. Deadlock detection

โœ… Answer: B
Solution:

  • Rigorous 2PL: all locks held until commit, stricter than strict 2PL (which only holds X locks).

Q20

Which of these cannot happen under Rigorous 2PL?
A. Cascading abort
B. Deadlock
C. Conflict-serializable schedule
D. Waiting for lock

โœ… Answer: A
Solution:

  • Rigorous 2PL prevents cascading aborts by holding all locks until commit.
  • Deadlocks and waiting may still occur, but no cascading aborts.

Q21

Schedule: T1: r(A) w(B), T2: w(A) r(B) under Strict 2PL.
What happens?
A. Deadlock
B. T1 aborts
C. T2 waits
D. T2 proceeds immediately

โœ… Answer: C
Solution:

  • T1 locks A for read โ†’ T2 wants to write โ†’ conflict โ†’ T2 waits until T1 releases.

Q22

Which protocol prevents reading uncommitted data?
A. Basic 2PL
B. Strict 2PL
C. Rigorous 2PL
D. Both B and C

โœ… Answer: D
Solution:

  • Strict & Rigorous 2PL hold X locks until commit โ†’ other transactions cannot read uncommitted data โ†’ prevents cascading aborts.

Q23

T1 holds X(A), T2 requests S(A). Which occurs under Rigorous 2PL?
A. T2 proceeds
B. T2 waits
C. T1 aborts
D. Deadlock occurs immediately

โœ… Answer: B
Solution:

  • X lock conflicts with S โ†’ T2 waits until T1 commits/releases โ†’ safe.

Q24

Which is not a property of Basic 2PL?
A. Conflict serializable
B. Deadlock-free
C. Two phases: growing and shrinking
D. Locks may release before commit

โœ… Answer: B
Solution:

  • Basic 2PL can have deadlocks.
  • Deadlock-free is not guaranteed โ†’ only serializability is.

Q25

T1 holds S(A), T2 holds S(B), T3 requests X(A).
Which can proceed?
A. T2
B. T3
C. Both
D. None

โœ… Answer: A
Solution:

  • T2 holds S(B) โ†’ no conflict.
  • T3 wants X(A) โ†’ waits until T1 releases โ†’ T2 can proceed.

Q26

Which locking protocol prevents cascading aborts and ensures recoverability?
A. Basic 2PL
B. Strict 2PL
C. Rigorous 2PL
D. Both B and C

โœ… Answer: D
Solution:

  • Both Strict and Rigorous 2PL hold X locks until commit โ†’ safe against cascading aborts.

Q27

Schedule: T1: r(A) w(B), T2: r(B) w(A) using Basic 2PL.
What can happen?
A. Deadlock
B. Cascading abort
C. Both A and B
D. None

โœ… Answer: C
Solution:

  • Deadlock: T1 waits for B, T2 waits for A โ†’ circular wait.
  • Cascading abort: Basic 2PL may release some locks early โ†’ others read uncommitted โ†’ unsafe.

Q28

T1 holds X(A), T2 requests X(A). Which occurs in Strict 2PL?
A. Both proceed
B. T2 waits
C. Deadlock
D. T1 aborts

โœ… Answer: B
Solution:

  • T1 holds X โ†’ T2 must wait โ†’ no immediate deadlock yet.

Q29

Which 2PL variant holds all locks (S & X) until commit?
A. Basic 2PL
B. Strict 2PL
C. Rigorous 2PL
D. Cascading 2PL

โœ… Answer: C
Solution:

  • Rigorous 2PL โ†’ all locks held until commit, prevents cascading aborts, ensures recoverable schedule.

Q30

Which statement is true about S and X locks?
A. S and X locks are compatible
B. Multiple S locks can coexist
C. Multiple X locks can coexist
D. S locks conflict with other S locks

โœ… Answer: B
Solution:

  • Shared locks (S) allow multiple readers โ†’ compatible with each other.
  • X locks conflict with all.

Q31

T1 holds S(A), T2 requests S(A), T3 requests X(A).
Which can proceed immediately?
A. T2
B. T3
C. Both
D. None

โœ… Answer: A
Solution:

  • S locks compatible โ†’ T2 proceeds.
  • X lock waits until all S locks released โ†’ T3 waits.

Q32

Which 2PL protocol does not prevent deadlocks inherently?
A. Basic 2PL
B. Strict 2PL
C. Rigorous 2PL
D. Both B and C

โœ… Answer: A
Solution:

  • Basic 2PL can lead to deadlocks โ†’ deadlock prevention is not inherent.

Q33

T1 holds S(A), T2 holds S(B), T3 requests X(A). Which occurs?
A. Deadlock
B. T3 waits
C. T1 aborts
D. All proceed

โœ… Answer: B
Solution:

  • T3 wants X(A) โ†’ conflicts with T1’s S(A) โ†’ T3 waits until T1 releases lock.

Q34

Which locking protocol ensures conflict serializability?
A. Basic 2PL
B. Strict 2PL
C. Rigorous 2PL
D. All of the above

โœ… Answer: D
Solution:

  • All 2PL variants follow growing and shrinking phases, ensuring conflict serializability.

Q35

T1 holds X(A), T2 requests S(A). Which occurs in Rigorous 2PL?
A. T2 waits
B. T1 aborts
C. Both proceed
D. Deadlock occurs

โœ… Answer: A
Solution:

  • X lock conflicts with S โ†’ T2 waits until T1 commits/releases.

Q36

Which is not guaranteed by Basic 2PL?
A. Conflict serializability
B. Deadlock prevention
C. Growing phase โ†’ acquiring locks
D. Shrinking phase โ†’ releasing locks

โœ… Answer: B
Solution:

  • Basic 2PL may deadlock, serializability is guaranteed but not deadlock prevention.

Q37

Which protocol prevents cascading aborts?
A. Basic 2PL
B. Strict 2PL
C. Both
D. None

โœ… Answer: B
Solution:

  • Strict 2PL holds X locks until commit, preventing cascading aborts.

Q38

T1 requests S(A), T2 requests X(A), T3 requests S(A).
Which can proceed?
A. T2
B. T1
C. T3
D. T1 and T3

โœ… Answer: B
Solution:

  • T1 can acquire S(A) โ†’ no prior locks.
  • T2 waits for exclusive โ†’ T3 waits until S lock free โ†’ T1 proceeds first.

Q39

Deadlock occurs when:
A. Transactions request only S locks
B. Transactions request X locks in same order
C. Circular wait exists
D. No writes occur

โœ… Answer: C
Solution:

  • Circular wait for conflicting locks โ†’ deadlock.

Q40

T1 requests X(A), T2 requests X(B), T1 waits for B, T2 waits for A.
Which occurs?
A. Deadlock
B. T1 proceeds
C. T2 aborts
D. No conflict

โœ… Answer: A
Solution:

  • Circular wait โ†’ deadlock occurs.

Q41

T1 holds S(A), T2 holds S(B), T3 requests X(A).
What happens?
A. T3 proceeds
B. T3 waits
C. T1 aborts
D. Deadlock

โœ… Answer: B
Solution:

  • X lock conflicts with S โ†’ T3 must wait until T1 releases S(A).

Q42

Which variant of 2PL holds X locks until commit but releases S locks earlier?
A. Basic 2PL
B. Strict 2PL
C. Rigorous 2PL
D. Cascading 2PL

โœ… Answer: B
Solution:

  • Strict 2PL: X locks until commit, S locks can be released โ†’ prevents cascading aborts but may allow shared locks to release early.

Q43

T1 holds X(A), T2 requests X(A). Which occurs under Rigorous 2PL?
A. Deadlock
B. T2 waits
C. T1 aborts
D. Both proceed

โœ… Answer: B
Solution:

  • T1 holds X(A) โ†’ T2 must wait until commit โ†’ no deadlock yet.

Q44

Schedule: T1: r(A) w(B), T2: w(A) r(B) under Basic 2PL.
What can occur?
A. Deadlock
B. Cascading abort
C. Both A and B
D. None

โœ… Answer: C
Solution:

  • Circular wait โ†’ deadlock
  • Early release โ†’ cascading abort possible

Q45

Which 2PL variant holds all locks (S & X) until commit?
A. Basic 2PL
B. Strict 2PL
C. Rigorous 2PL
D. Growing 2PL

โœ… Answer: C
Solution:

  • Rigorous 2PL โ†’ all locks held until commit โ†’ prevents cascading aborts โ†’ strict recoverability.

Q46

Which type of lock allows multiple readers but not writers?
A. Shared (S)
B. Exclusive (X)
C. Mixed (M)
D. None

โœ… Answer: A
Solution:

  • S lock allows concurrent reads โ†’ multiple S locks can coexist, X locks conflict.

Q47

T1 holds S(A), T2 requests X(A). Which occurs under Strict 2PL?
A. T2 waits
B. T1 aborts
C. Deadlock
D. T2 proceeds immediately

โœ… Answer: A
Solution:

  • X lock conflicts with S โ†’ T2 waits until T1 releases S(A).

Q48

Which of the following cannot happen under Rigorous 2PL?
A. Deadlock
B. Cascading abort
C. Waiting for locks
D. Serializability

โœ… Answer: B
Solution:

  • Rigorous 2PL holds all locks until commit โ†’ prevents cascading aborts, but deadlocks and waiting may still occur.

Q49

T1 holds X(A), T2 requests S(A), T3 requests X(A).
Which can proceed?
A. T2
B. T3
C. Both
D. None

โœ… Answer: D
Solution:

  • X lock held by T1 โ†’ S(A) and X(A) requests conflict โ†’ both wait.

Q50

Which protocol prevents reading uncommitted data?
A. Basic 2PL
B. Strict 2PL
C. Rigorous 2PL
D. Both B and C

โœ… Answer: D
Solution:

  • Holding X locks until commit prevents other transactions from reading uncommitted data โ†’ ensures recoverable schedules.

Q51

Deadlock occurs when:
A. Transactions request locks in same order
B. Circular wait exists among transactions
C. Transactions hold no locks
D. Only S locks requested

โœ… Answer: B
Solution:

  • Deadlock arises from circular waiting โ†’ two or more transactions waiting for locks held by each other.

Q52

T1 requests S(A), T2 requests X(A), T3 requests S(A).
Who proceeds first?
A. T1
B. T2
C. T3
D. T2 and T3

โœ… Answer: A
Solution:

  • T1 acquires S(A) โ†’ T2 and T3 must wait โ†’ T1 proceeds.

Q53

Which property is guaranteed by Basic 2PL?
A. Deadlock-free
B. Conflict serializability
C. Cascading abort-free
D. Rigorous lock holding

โœ… Answer: B
Solution:

  • Basic 2PL โ†’ growing and shrinking phases โ†’ conflict serializable, but may deadlock or cause cascading aborts.

Q54

T1 holds X(A), T2 requests S(A).
Which occurs in Rigorous 2PL?
A. T2 proceeds
B. T2 waits
C. Deadlock
D. T1 aborts

โœ… Answer: B
Solution:

  • X lock conflicts with S โ†’ T2 waits until T1 commits/releases.

Q55

Which of the following ensures conflict serializability and recoverability?
A. Basic 2PL
B. Strict 2PL
C. Rigorous 2PL
D. Both B and C

โœ… Answer: D
Solution:

  • Strict & Rigorous 2PL โ†’ conflict serializable, prevent cascading aborts โ†’ recoverable.

Q56

T1 holds S(A), T2 holds S(B), T3 requests X(A).
Which occurs?
A. T3 proceeds
B. T3 waits
C. T1 aborts
D. T2 aborts

โœ… Answer: B
Solution:

  • X(A) conflicts with S(A) โ†’ T3 waits โ†’ safe.

Q57

T1 holds X(A), T2 requests X(A).
What occurs under Strict 2PL?
A. Both proceed
B. T2 waits
C. Deadlock
D. T1 aborts

โœ… Answer: B
Solution:

  • X(A) already held โ†’ T2 waits until T1 commits โ†’ no immediate deadlock.

Q58

Which phase in 2PL is for releasing locks?
A. Growing phase
B. Shrinking phase
C. Committing phase
D. Waiting phase

โœ… Answer: B
Solution:

  • Shrinking phase โ†’ transaction releases locks.
  • Growing phase โ†’ acquiring locks.

Q59

Which protocol prevents cascading aborts completely?
A. Basic 2PL
B. Strict 2PL
C. Rigorous 2PL
D. Both B and C

โœ… Answer: D
Solution:

  • Holding all or X locks until commit โ†’ prevents cascading aborts.

Q60

T1 requests S(A), T2 requests S(A), T3 requests X(A).
Who can proceed?
A. T2
B. T3
C. T1 and T2
D. T1 only

โœ… Answer: C
Solution:

  • Multiple S locks compatible โ†’ T1 and T2 proceed concurrently.
  • X lock waits until all S locks are released.

Q61

T1 holds X(A), T2 requests S(A), T3 requests X(A).
Which can proceed first under Rigorous 2PL?
A. T2
B. T3
C. T1
D. None

โœ… Answer: C
Solution:

  • T1 already holds X(A) โ†’ continues until commit โ†’ T2 and T3 must wait.

Q62

Which locking protocol prevents reading uncommitted data?
A. Basic 2PL
B. Strict 2PL
C. Rigorous 2PL
D. Both B and C

โœ… Answer: D
Solution:

  • Strict & Rigorous 2PL hold X locks until commit โ†’ prevents other transactions from reading uncommitted values.

Q63

T1 holds S(A), T2 requests X(A).
What happens?
A. T2 waits
B. T1 aborts
C. Deadlock
D. T2 proceeds immediately

โœ… Answer: A
Solution:

  • X lock conflicts with S โ†’ T2 waits until T1 releases S(A).

Q64

Which 2PL variant can still cause cascading aborts?
A. Basic 2PL
B. Strict 2PL
C. Rigorous 2PL
D. Both B and C

โœ… Answer: A
Solution:

  • Basic 2PL may release locks early โ†’ other transactions may read uncommitted values โ†’ cascading aborts possible.

Q65

T1 holds S(A), T2 holds S(A), T3 requests X(A).
Who proceeds first?
A. T1 and T2
B. T3
C. T1 only
D. T2 only

โœ… Answer: A
Solution:

  • Multiple S locks compatible โ†’ T1 and T2 can proceed concurrently.
  • T3 waits for exclusive lock โ†’ blocked.

Q66

Deadlock occurs when:
A. Transactions request locks in same order
B. Circular wait exists among transactions
C. Only S locks requested
D. Transactions release locks immediately

โœ… Answer: B
Solution:

  • Deadlock arises from circular wait โ†’ multiple transactions waiting for locks held by each other.

Q67

T1 requests S(A), T2 requests X(A), T3 requests S(A).
Who proceeds first?
A. T1
B. T2
C. T3
D. T2 and T3

โœ… Answer: A
Solution:

  • T1 acquires S(A) first โ†’ T2 and T3 must wait โ†’ T1 proceeds.

Q68

Which of the following cannot happen under Rigorous 2PL?
A. Cascading abort
B. Deadlock
C. Waiting for locks
D. Conflict-serializable schedule

โœ… Answer: A
Solution:

  • Rigorous 2PL holds all locks until commit โ†’ prevents cascading aborts.
  • Deadlock and waiting may still occur.

Q69

Which 2PL variant holds all locks until commit?
A. Basic 2PL
B. Strict 2PL
C. Rigorous 2PL
D. Cascading 2PL

โœ… Answer: C
Solution:

  • Rigorous 2PL โ†’ all S & X locks held until commit โ†’ ensures recoverability and conflict-serializability.

Q70

T1 holds X(A), T2 requests S(A).
Which occurs under Strict 2PL?
A. T2 waits
B. T1 aborts
C. Deadlock
D. T2 proceeds

โœ… Answer: A
Solution:

  • X lock conflicts with S โ†’ T2 waits until T1 releases X(A).

Q71

Which phase in 2PL is for acquiring locks?
A. Growing phase
B. Shrinking phase
C. Commit phase
D. Deadlock phase

โœ… Answer: A
Solution:

  • Growing phase โ†’ transaction acquires all required locks.
  • Shrinking phase โ†’ releasing locks.

Q72

T1 holds S(A), T2 holds S(A), T3 requests X(A).
Who can proceed immediately?
A. T1 and T2
B. T3
C. T1 only
D. T2 only

โœ… Answer: A
Solution:

  • Multiple S locks compatible โ†’ T1 and T2 proceed.
  • X lock (T3) waits until S locks released.

Q73

T1 holds X(A), T2 requests X(A).
Which occurs under Rigorous 2PL?
A. Deadlock
B. T2 waits
C. T1 aborts
D. Both proceed

โœ… Answer: B
Solution:

  • T2 waits until T1 commits/releases X(A) โ†’ no immediate deadlock.

Q74

Which of the following guarantees conflict serializability?
A. Basic 2PL
B. Strict 2PL
C. Rigorous 2PL
D. All of the above

โœ… Answer: D
Solution:

  • All 2PL variants enforce growing/shrinking phases โ†’ conflict serializable.

Q75

T1 requests S(A), T2 requests X(A), T3 requests S(A).
Who proceeds first?
A. T1
B. T2
C. T3
D. T2 and T3

โœ… Answer: A
Solution:

  • T1 acquires S(A) first โ†’ T2 waits for exclusive โ†’ T3 waits for S until lock free.

Q76

Which locking protocol prevents reading uncommitted data?
A. Basic 2PL
B. Strict 2PL
C. Rigorous 2PL
D. Both B and C

โœ… Answer: D
Solution:

  • X locks held until commit โ†’ other transactions cannot read uncommitted data โ†’ safe & recoverable.

Q77

Deadlock can be resolved by:
A. Wait-die scheme
B. Wound-wait scheme
C. Transaction rollback
D. All of the above

โœ… Answer: D
Solution:

  • All methods either prevent or resolve deadlocks in locking protocols.

Q78

T1 holds S(A), T2 holds S(B), T3 requests X(A).
Which occurs?
A. T3 proceeds
B. T3 waits
C. T1 aborts
D. T2 aborts

โœ… Answer: B
Solution:

  • X(A) conflicts with T1’s S(A) โ†’ T3 must wait.

Q79

Which 2PL variant may release locks before commit?
A. Basic 2PL
B. Strict 2PL
C. Rigorous 2PL
D. Both B and C

โœ… Answer: A
Solution:

  • Basic 2PL โ†’ shrinking phase may release locks early โ†’ cascading aborts possible.

Q80

T1 requests S(A), T2 requests S(A), T3 requests X(A).
Who can proceed immediately?
A. T1 and T2
B. T3
C. T1 only
D. T2 only

โœ… Answer: A
Solution:

  • Multiple S locks compatible โ†’ T1 and T2 proceed concurrently.
  • T3 waits for X(A) โ†’ blocked.

Perfect โœ… Letโ€™s complete the final batch: Locking Protocol MCQs Q81โ€“Q100 with unique scenarios, four options, and detailed solutions for GATE exam preparation.

Q81

T1 holds X(A), T2 requests X(A), T3 requests S(A).
Which occurs first under Rigorous 2PL?
A. T2
B. T3
C. T1
D. Deadlock

โœ… Answer: C
Solution:

  • T1 holds X(A) โ†’ continues until commit โ†’ T2 and T3 must wait.

Q82

Which 2PL variant prevents cascading aborts and ensures recoverability?
A. Basic 2PL
B. Strict 2PL
C. Rigorous 2PL
D. Both B and C

โœ… Answer: D
Solution:

  • Strict & Rigorous 2PL hold X locks until commit โ†’ prevents other transactions from reading uncommitted values โ†’ recoverable.

Q83

T1 requests S(A), T2 requests X(A).
What happens under Strict 2PL?
A. T2 waits
B. T1 aborts
C. Deadlock
D. T2 proceeds immediately

โœ… Answer: A
Solution:

  • X lock conflicts with S โ†’ T2 waits until T1 releases S(A).

Q84

T1 holds S(A), T2 holds S(B), T3 requests X(A).
Who can proceed?
A. T1
B. T2
C. T3
D. T1 and T2

โœ… Answer: D
Solution:

  • T1 and T2 hold compatible S locks โ†’ can proceed.
  • T3 requests X(A) โ†’ waits until S locks released.

Q85

Which 2PL variant may release S locks before commit?
A. Basic 2PL
B. Strict 2PL
C. Rigorous 2PL
D. Both B and C

โœ… Answer: A
Solution:

  • Basic 2PL may release locks in shrinking phase โ†’ possible cascading aborts.

Q86

T1 holds X(A), T2 requests S(A).
Which occurs under Rigorous 2PL?
A. T2 proceeds
B. T2 waits
C. Deadlock
D. T1 aborts

โœ… Answer: B
Solution:

  • X lock conflicts with S โ†’ T2 waits until T1 commits/releases.

Q87

Deadlock prevention schemes include:
A. Wait-die
B. Wound-wait
C. Timestamp ordering
D. All of the above

โœ… Answer: D
Solution:

  • All schemes either prevent or resolve deadlocks by ordering or aborting transactions.

Q88

T1 requests S(A), T2 requests S(A), T3 requests X(A).
Who proceeds first?
A. T1 and T2
B. T3
C. T1 only
D. T2 only

โœ… Answer: A
Solution:

  • Multiple S locks compatible โ†’ T1 and T2 proceed concurrently.
  • T3 waits for X(A).

Q89

Which phase in 2PL is for releasing locks?
A. Growing phase
B. Shrinking phase
C. Commit phase
D. Waiting phase

โœ… Answer: B
Solution:

  • Shrinking phase โ†’ transaction releases locks.
  • Growing phase โ†’ acquiring locks.

Q90

T1 holds S(A), T2 requests X(A), T3 requests S(A).
Who can proceed?
A. T1
B. T2
C. T3
D. T2 and T3

โœ… Answer: A
Solution:

  • T1 acquires S(A) first โ†’ T2 waits for exclusive โ†’ T3 waits for S until lock free.

Q91

Which locking protocol guarantees conflict serializability?
A. Basic 2PL
B. Strict 2PL
C. Rigorous 2PL
D. All of the above

โœ… Answer: D
Solution:

  • All 2PL variants follow growing and shrinking phases, ensuring conflict serializable schedules.

Q92

T1 requests X(A), T2 requests S(A), T3 requests X(A).
Who proceeds first under Strict 2PL?
A. T1
B. T2
C. T3
D. Deadlock

โœ… Answer: A
Solution:

  • T1 acquires X(A) โ†’ continues until commit โ†’ others wait.

Q93

T1 holds S(A), T2 requests X(A).
Which occurs under Basic 2PL?
A. T2 waits
B. T1 aborts
C. Deadlock
D. Both proceed

โœ… Answer: A
Solution:

  • T1 holds S(A) โ†’ X(A) conflicts โ†’ T2 waits until lock released.

Q94

Which 2PL variant holds all locks until commit?
A. Basic 2PL
B. Strict 2PL
C. Rigorous 2PL
D. Growing 2PL

โœ… Answer: C
Solution:

  • Rigorous 2PL โ†’ holds all locks (S & X) until commit โ†’ ensures recoverability and prevents cascading aborts.

Q95

Deadlock occurs in 2PL when:
A. Transactions request locks in same order
B. Circular wait exists
C. Only S locks requested
D. Transactions release locks immediately

โœ… Answer: B
Solution:

  • Circular wait among conflicting locks โ†’ deadlock.

Q96

T1 holds S(A), T2 holds S(A), T3 requests X(A).
Who proceeds immediately?
A. T1 and T2
B. T3
C. T1 only
D. T2 only

โœ… Answer: A
Solution:

  • S locks compatible โ†’ T1 and T2 proceed โ†’ T3 waits for X(A).

Q97

Which of the following prevents cascading aborts?
A. Basic 2PL
B. Strict 2PL
C. Both
D. None

โœ… Answer: B
Solution:

  • Strict 2PL holds X locks until commit โ†’ prevents cascading aborts.

Q98

T1 requests S(A), T2 requests X(A), T3 requests S(A).
Who proceeds first?
A. T1
B. T2
C. T3
D. T2 and T3

โœ… Answer: A
Solution:

  • T1 acquires S(A) โ†’ others wait until release.

Q99

T1 holds X(A), T2 requests X(A).
Which occurs under Strict 2PL?
A. T2 waits
B. Both proceed
C. Deadlock
D. T1 aborts

โœ… Answer: A
Solution:

  • X(A) held โ†’ T2 waits โ†’ no immediate deadlock.

Q100

Which locking protocol ensures conflict serializability and recoverability?
A. Basic 2PL
B. Strict 2PL
C. Rigorous 2PL
D. Both B and C

โœ… Answer: D
Solution:

  • Strict & Rigorous 2PL โ†’ conflict serializable, prevent cascading aborts โ†’ recoverable schedules.

โœ… That completes all 100 Locking Protocol MCQs with:

  • Unique transactions and numeric variations
  • Four options (Aโ€“D)
  • Detailed step-by-step solutions

About the Author

examhopeinfo@gmail.com

Administrator

Visit Website View All Posts

Post navigation

Previous: Recoverability MCQs For Gate Exam
Next: Timestamp Ordering Protocol MCQs For Gate Exam

Related News

Vivo X200 Price Drop
  • IT
  • Current Affairs
  • Tech News

Vivo X200: เคœเคพเคจเฅ‡ เค•เคฟเคคเคจเฅ€ เค•เคฎ เค•เฅ€เคฎเคค เคชเคฐ เคฎเคฟเคฒ เคฐเคนเคพ เคฏเฅ‡ 9400 เคฎเคฟเคกเคฟเคฏเคพ เคŸเฅ‡เค• เคชเฅเคฐเฅ‹เคธเฅ‡เคธเคฐ เคตเคพเคฒเคพ เคธเฅเคฎเคพเคฐเฅเคŸเคซเฅ‹เคจ

examhopeinfo@gmail.com December 23, 2025 0
Samsung Galaxy S25 Plus
  • IT
  • Current Affairs
  • Tech News

Samsung Galaxy S25 Plus เคชเคฐ เคฎเคฟเคฒ เคฐเคนเฅ€ เคญเคพเคฐเฅ€ เค›เฅ‚เคŸ ,เคœเคพเคจเฅ‡ เคธเฅ‡เคฒ เคชเฅเคฐเคพเค‡เคธ

examhopeinfo@gmail.com December 22, 2025 0
Electricity bill saving Smart Plug
  • IT
  • Current Affairs
  • Tech News

AI เค•เฅ‡ เค‡เคธ เฅ›เคฎเคพเคจเฅ‡ เคฎเฅ‡เค‚ เค•เฅˆเคธเฅ‡ เคฌเคฟเคœเคฒเฅ€ เคฌเคšเคพ เคฐเคนเฅ‡ เคนเฅˆเค‚ เคฏเคน เคธเฅเคฎเคพเคฐเฅเคŸ เคชเฅเคฒเค—?

examhopeinfo@gmail.com December 21, 2025 0

Recent Posts

  • Vivo X200: เคœเคพเคจเฅ‡ เค•เคฟเคคเคจเฅ€ เค•เคฎ เค•เฅ€เคฎเคค เคชเคฐ เคฎเคฟเคฒ เคฐเคนเคพ เคฏเฅ‡ 9400 เคฎเคฟเคกเคฟเคฏเคพ เคŸเฅ‡เค• เคชเฅเคฐเฅ‹เคธเฅ‡เคธเคฐ เคตเคพเคฒเคพ เคธเฅเคฎเคพเคฐเฅเคŸเคซเฅ‹เคจ
  • Samsung Galaxy S25 Plus เคชเคฐ เคฎเคฟเคฒ เคฐเคนเฅ€ เคญเคพเคฐเฅ€ เค›เฅ‚เคŸ ,เคœเคพเคจเฅ‡ เคธเฅ‡เคฒ เคชเฅเคฐเคพเค‡เคธ
  • AI เค•เฅ‡ เค‡เคธ เฅ›เคฎเคพเคจเฅ‡ เคฎเฅ‡เค‚ เค•เฅˆเคธเฅ‡ เคฌเคฟเคœเคฒเฅ€ เคฌเคšเคพ เคฐเคนเฅ‡ เคนเฅˆเค‚ เคฏเคน เคธเฅเคฎเคพเคฐเฅเคŸ เคชเฅเคฒเค—?
  • เค•เฅเคฏเคพ เคนเฅˆ เคฏเคน GhostPairing Scam เค”เคฐ เคฌเคฟเคจเคพ เคชเคพเคธเคตเคฐเฅเคก เค”เคฐ เคธเคฟเคฎ เค•เฅ‡ เค•เฅเคฏเฅ‹เค‚ เคนเฅ‹ เคฐเคนเคพ เคนเฅˆ เคตเฅเคนเคพเคŸเฅเคธเคชเฅเคช เค…เค•เคพเค‰เค‚เคŸ เคนเฅˆเค•
  • Leica เค•เฅˆเคฎเคฐเฅ‡ เค•เฅ‡ เคธเคพเคฅ เคœเคฒเฅเคฆ เคฒเฅ‰เคจเฅเคš เคนเฅ‹ เคธเค•เคคเคพ เคนเฅˆ Xiaomi Ultra 17

At ExamHope, we understand that preparing for exams can be challenging, overwhelming, and sometimes stressful. Thatโ€™s why we are dedicated to providing high-quality educational resources, tips, and guidance to help students and aspirants achieve their goals with confidence. Whether you are preparing for competitive exams, school tests, or professional certifications, ExamHope is here to make your learning journey smarter, easier, and more effective.

Quick links

  • About us
  • Contact Us
  • Privacy Policy
  • Terms and Conditions
  • Disclaimer
  • DMCA Policy

Category

  • Computer Network
  • Computer Organization and Architecture
  • Data Structures
  • C Language
  • Theory of Computation
  • Database

You may have missed

Vivo X200 Price Drop
  • IT
  • Current Affairs
  • Tech News

Vivo X200: เคœเคพเคจเฅ‡ เค•เคฟเคคเคจเฅ€ เค•เคฎ เค•เฅ€เคฎเคค เคชเคฐ เคฎเคฟเคฒ เคฐเคนเคพ เคฏเฅ‡ 9400 เคฎเคฟเคกเคฟเคฏเคพ เคŸเฅ‡เค• เคชเฅเคฐเฅ‹เคธเฅ‡เคธเคฐ เคตเคพเคฒเคพ เคธเฅเคฎเคพเคฐเฅเคŸเคซเฅ‹เคจ

examhopeinfo@gmail.com December 23, 2025 0
Samsung Galaxy S25 Plus
  • IT
  • Current Affairs
  • Tech News

Samsung Galaxy S25 Plus เคชเคฐ เคฎเคฟเคฒ เคฐเคนเฅ€ เคญเคพเคฐเฅ€ เค›เฅ‚เคŸ ,เคœเคพเคจเฅ‡ เคธเฅ‡เคฒ เคชเฅเคฐเคพเค‡เคธ

examhopeinfo@gmail.com December 22, 2025 0
Electricity bill saving Smart Plug
  • IT
  • Current Affairs
  • Tech News

AI เค•เฅ‡ เค‡เคธ เฅ›เคฎเคพเคจเฅ‡ เคฎเฅ‡เค‚ เค•เฅˆเคธเฅ‡ เคฌเคฟเคœเคฒเฅ€ เคฌเคšเคพ เคฐเคนเฅ‡ เคนเฅˆเค‚ เคฏเคน เคธเฅเคฎเคพเคฐเฅเคŸ เคชเฅเคฒเค—?

examhopeinfo@gmail.com December 21, 2025 0
Ghost Pairing Scam on Whatsapp
  • IT
  • Current Affairs
  • Tech News

เค•เฅเคฏเคพ เคนเฅˆ เคฏเคน GhostPairing Scam เค”เคฐ เคฌเคฟเคจเคพ เคชเคพเคธเคตเคฐเฅเคก เค”เคฐ เคธเคฟเคฎ เค•เฅ‡ เค•เฅเคฏเฅ‹เค‚ เคนเฅ‹ เคฐเคนเคพ เคนเฅˆ เคตเฅเคนเคพเคŸเฅเคธเคชเฅเคช เค…เค•เคพเค‰เค‚เคŸ เคนเฅˆเค•

examhopeinfo@gmail.com December 21, 2025 0
Copyright ยฉ All rights reserved for ExamHope. | MoreNews by AF themes.
Go to mobile version