arrow
arrow
arrow
Match the LIST-I with LIST-II. List – I List – II A. Wait-for graph I. Holds all locks until it commits B. Precedence graph
Question

Match the LIST-I with LIST-II.


List – I

List – II
A.
Wait-for graph
I.
Holds all locks until it commits
B.
Precedence graph
II.
Holds write-locks until it commits
C.
Rigorous 2PL
III.
Used to check deadlocks
D.
Strict 2PL
IV.
Used to check serializability

Choose the correct answer from the options given below:

A.

A-III, B-IV, C-I, D-II

B.

A-III, B-IV, C-II, D-I

C.

A-IV, B-I, C-II, D-III

D.

A-IV, B-III, C-II, D-I

Correct option is A

A wait-for graph is used in database systems to detect deadlocks by representing transactions as vertices and waiting relationships as directed edges.
A precedence graph (serialization graph) is used to determine whether a schedule is conflict-serializable.
In Rigorous Two-Phase Locking (Rigorous 2PL), a transaction holds both read and write locks until it commits or aborts, making it stricter than Strict 2PL.
In Strict Two-Phase Locking (Strict 2PL), at least all exclusive/write locks are held until commit or abort, while shared/read locks may be released earlier.
Information Booster
1. Wait-for Graph → Deadlock Detection
· A wait-for graph contains transactions as vertices.
· An edge TiTjT_i \rightarrow T_j​ indicates that TiT_i​ is waiting for a resource/lock held by Tj.T_j.​​
· A cycle in the wait-for graph indicates a deadlock in the usual single-instance resource/lock setting.
· Example:
T1T2T1T_1\rightarrow T_2\rightarrow T_1​​
indicates a circular wait and hence a deadlock.
2. Precedence Graph → Serializability
· A precedence graph represents the ordering constraints between transactions in a schedule.
· Each transaction is represented by a vertex.
· An edge TiTjT_i\rightarrow T_j​ is introduced when conflicting operations require TiT_i​ to precede Tj.T_j.​​
· A schedule is conflict-serializable if and only if its precedence graph is acyclic.
3. Rigorous 2PL → All Locks Until Commit
· Rigorous 2PL requires a transaction to hold all acquired locks, both shared and exclusive, until it commits or aborts.
· Therefore, neither read locks nor write locks are released before the transaction completes.
· It provides strong recoverability and simplifies transaction ordering.
4. Strict 2PL → Write Locks Until Commit
· Strict 2PL requires exclusive (write) locks to be retained until commit or abort.
· Shared locks may be released before commitment, depending on the implementation.
· It prevents transactions from reading or overwriting data written by an uncommitted transaction.
5. Comparison of Strict and Rigorous 2PL

Property
Strict 2PL
Rigorous 2PL
Write locks until commit
Yes
Yes
Read locks until commit
Not necessarily
Yes
All locks until commit
Not necessarily
Yes
Strength
Less restrictive
More restrictive

Free Tests

Free
Must Attempt

Basics of Education: Pedagogy, Andragogy, and Hutagogy

languageIcon English
  • pdpQsnIcon10 Questions
  • pdpsheetsIcon20 Marks
  • timerIcon12 Mins
languageIcon English
Free
Must Attempt

UGC NET Paper 1 Mock Test 1

languageIcon English
  • pdpQsnIcon50 Questions
  • pdpsheetsIcon100 Marks
  • timerIcon60 Mins
languageIcon English
Free
Must Attempt

Basics of Education: Pedagogy, Andragogy, and Hutagogy

languageIcon English
  • pdpQsnIcon10 Questions
  • pdpsheetsIcon20 Marks
  • timerIcon12 Mins
languageIcon English

Similar Questions

test-prime-package

Access ‘UGC NET Computer Science’ Mock Tests with

  • 60000+ Mocks and Previous Year Papers
  • Unlimited Re-Attempts
  • Personalised Report Card
  • 500% Refund on Final Selection
  • Largest Community
students-icon
527k+ students have already unlocked exclusive benefits with Test Prime!

Similar Questions

Our Plans
Monthsup-arrow