Home »
MCQs »
DBMS MCQs
DBMS Deadlock MCQs
DBMS Deadlock MCQs: This section contains multiple-choice questions and answers on Deadlock in DBMS.
Submitted by Anushree Goswami, on April 19, 2022
1. When two or more transactions are stuck in a ___, they cannot complete any further transactions until one of them releases the lock.
- Lock
- Deadlock
- Lockdead
- Deadstate
Answer: B) Deadlock
Explanation:
When two or more transactions are stuck in a deadlock, they cannot complete any further transactions until one of them releases the lock.
Discuss this Question
2. There are many DBMS complications feared, such as deadlock, where no task is ever completed and there is forever a ___ state.
- Waiting
- Complete
- Incomplete
- Finished
Answer: A) Waiting
Explanation:
There are many DBMS complications feared, such as deadlock, where no task is ever completed and there is forever a waiting state.
Discuss this Question
3. Deadlocks can be mitigated by avoiding the database rather than ___ it.
- Aborting
- Restating
- Both A and B
- None of the above
Answer: C) Both A and B
Explanation:
Deadlocks can be mitigated by avoiding the database rather than aborting or restating it.
Discuss this Question
4. Any deadlock situation is detected in advance by the ___ mechanism.
- Deadlock detection
- Deadlock Recognition
- Deadlock Avoidance
- Deadlock Rehabilitation
Answer: C) Deadlock Avoidance
Explanation:
Any deadlock situation is detected in advance by the deadlock avoidance mechanism.
Discuss this Question
5. It is possible to detect deadlock situations using methods such as "___", but this method is suitable for smaller databases only.
- Build for graph
- Design for graph
- Take for graph
- Wait for graph
Answer: D) Wait for graph
Explanation:
It is possible to detect deadlock situations using methods such as "wait for graph", but this method is suitable for smaller databases only.
Discuss this Question
6. It is the DBMS' responsibility to detect in the event of a database deadlock whether or not a transaction has waited ___ for a lock.
- Definitely
- Indefinitely
- Determinant
- Indeterminant
Answer: B) Indefinitely
Explanation:
It is the DBMS' responsibility to detect in the event of a database deadlock whether or not a transaction has waited indefinitely for a lock.
Discuss this Question
7. Detecting a deadlock cycle in a database is handled by the ____ manager through a Wait for the graph.
- Log
- Look
- Lock
- Key
Answer: C) Lock
Explanation:
Detecting a deadlock cycle in a database is handled by the lock manager through a Wait for the graph.
Discuss this Question
8. A graph is created based on the transaction and its ___ after the method Wait for graph is executed.
- Key
- Lock
- Data
- Graph
Answer: B) Lock
Explanation:
A graph is created based on the transaction and its lock after the method Wait for graph is executed.
Discuss this Question
9. ___ create deadlocks.
- Cycles
- Closed-loops
- Both A and B
- None of the above
Answer: C) Both A and B
Explanation:
Cycles or closed-loops create deadlocks.
Discuss this Question
10. What is TRUE about Wait for Graph?
- As each transaction waits for some data that is being held by another, the waiting graph is maintained by the system.
- A cycle in the graph is checked constantly by the system.
- Both A and B
- None of the above
Answer: C) Both A and B
Explanation:
In case of Wait for Graph -
- As each transaction waits for some data that is being held by another, the waiting graph is maintained by the system.
- A cycle in the graph is checked constantly by the system.
Discuss this Question
11. A ___ database can benefit from the deadlock prevention method.
- Large
- Small
- Short
- Little
Answer: A) Large
Explanation:
A large database can benefit from the deadlock prevention method.
Discuss this Question
12. Deadlock can be prevented by ___ resources so that no deadlock occurs.
- Allocating
- Deallocating
- Unallocating
- Reallocating
Answer: A) Allocating
Explanation:
Deadlock can be prevented by allocating resources so that no deadlock occurs.
Discuss this Question
13. As part of the database management system, the operation is analyzed to determine whether it will cause a ___ situation.
- Deadlock Prevention
- Deadlock Avoidance
- Deadlock
- None of the above
Answer: C) Deadlock
Explanation:
As part of the database management system, the operation is analyzed to determine whether it will cause a deadlock situation.
Discuss this Question
14. What are the different wait schemes in deadlock?
- Wait-Die
- Wound Wait Scheme
- Both A and B
- None of the above
Answer: C) Both A and B
Explanation:
The different wait schemes in deadlock are Wait-Die and Wound Wait Scheme.
Discuss this Question
15. DBMSs that use the ___ scheme will simply check the timestamp of both transactions if a transaction seeks to access a resource that is already locked by another transaction.
- Live
- Die
- Wait-Live
- Wait-Die
Answer: D) Wait-Die
Explanation:
DBMSs that use the Wait-Die scheme will simply check the timestamp of both transactions if a transaction seeks to access a resource that is already locked by another transaction.
Discuss this Question
16. Until the resource is available for execution, it will wait for the ___ transaction.
- Newer
- Older
- Both A and B
- None of the above
Answer: B) Older
Explanation:
Until the resource is available for execution, it will wait for the older transaction.
Discuss this Question
17. The ___ scheme forces the younger transaction to kill itself and release the resource if the older one requests a resource that is being held by the younger one.
- Round wait
- Wound wait
- Would wait
- Will wait
Answer: B) Wound wait
Explanation:
The wound wait scheme forces the younger transaction to kill itself and release the resource if the older one requests a resource that is being held by the younger one.
Discuss this Question
18. A younger transaction is restarted with the same ___ after a Wound Wait Scheme minute delay.
- Time
- Stamp
- Timestamp
- None
Answer: C) Timestamp
Explanation:
A younger transaction is restarted with the same timestamp after a Wound Wait Scheme minute delay.
Discuss this Question
19. In the case of Wound Wait Scheme, when a resource is held by an older transaction, and a young transaction request it, the older transaction will ___ until the younger transaction releases it.
- Not wait
- Wait
- Run
- Move
Answer: B) Wait
Explanation:
When a resource is held by an older transaction, and a young transaction request it, the older transaction will wait until the younger transaction releases it.
Discuss this Question