0
0
DBMS Theoryknowledge~5 mins

Deadlock handling in databases in DBMS Theory - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is a deadlock in a database system?
A deadlock occurs when two or more transactions wait indefinitely for each other to release locks on resources, causing all involved transactions to stop progressing.
Click to reveal answer
intermediate
Name one common method used to detect deadlocks in databases.
One common method is the wait-for graph, where transactions are nodes and edges represent waiting for locks. A cycle in this graph indicates a deadlock.
Click to reveal answer
intermediate
What is deadlock prevention in databases?
Deadlock prevention involves designing the system to avoid conditions that can cause deadlocks, such as by ordering resource requests or using timeouts.
Click to reveal answer
intermediate
How does deadlock resolution typically work in databases?
Deadlock resolution usually involves choosing one transaction as a victim and rolling it back to break the deadlock, allowing other transactions to continue.
Click to reveal answer
beginner
Why is deadlock handling important in database management?
Deadlock handling is important to ensure that transactions do not get stuck forever, which would block other operations and reduce system performance and reliability.
Click to reveal answer
What indicates a deadlock in a wait-for graph?
AA cycle in the graph
BA disconnected node
CA node with no edges
DA linear chain of nodes
Which of the following is NOT a deadlock handling technique?
ADeadlock detection
BDeadlock prevention
CDeadlock avoidance
DDeadlock ignoring
What action is taken to resolve a deadlock?
ACommit all transactions
BRestart the database server
CRollback one or more transactions
DIncrease lock timeout
Deadlock prevention can be achieved by:
AAllowing transactions to wait indefinitely
BRequesting all locks at once in a fixed order
CIgnoring lock requests
DUsing random lock granting
Why is deadlock detection preferred over prevention in some systems?
APrevention can reduce concurrency
BDetection avoids all deadlocks
CDetection is simpler to implement
DPrevention is slower
Explain what a deadlock is in a database and why it happens.
Think about transactions waiting for locks held by each other.
You got /3 concepts.
    Describe the main strategies used to handle deadlocks in databases.
    Consider how systems avoid, find, or fix deadlocks.
    You got /4 concepts.