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.

  1. Lock
  2. Deadlock
  3. Lockdead
  4. 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.

  1. Waiting
  2. Complete
  3. Incomplete
  4. 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.

  1. Aborting
  2. Restating
  3. Both A and B
  4. 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.

  1. Deadlock detection
  2. Deadlock Recognition
  3. Deadlock Avoidance
  4. 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.

  1. Build for graph
  2. Design for graph
  3. Take for graph
  4. 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.

  1. Definitely
  2. Indefinitely
  3. Determinant
  4. 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.

  1. Log
  2. Look
  3. Lock
  4. 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.

  1. Key
  2. Lock
  3. Data
  4. 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.

  1. Cycles
  2. Closed-loops
  3. Both A and B
  4. 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?

  1. As each transaction waits for some data that is being held by another, the waiting graph is maintained by the system.
  2. A cycle in the graph is checked constantly by the system.
  3. Both A and B
  4. None of the above

Answer: C) Both A and B

Explanation:

In case of Wait for Graph -

  1. As each transaction waits for some data that is being held by another, the waiting graph is maintained by the system.
  2. A cycle in the graph is checked constantly by the system.

Discuss this Question


11. A ___ database can benefit from the deadlock prevention method.

  1. Large
  2. Small
  3. Short
  4. 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.

  1. Allocating
  2. Deallocating
  3. Unallocating
  4. 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.

  1. Deadlock Prevention
  2. Deadlock Avoidance
  3. Deadlock
  4. 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?

  1. Wait-Die
  2. Wound Wait Scheme
  3. Both A and B
  4. 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.

  1. Live
  2. Die
  3. Wait-Live
  4. 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.

  1. Newer
  2. Older
  3. Both A and B
  4. 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.

  1. Round wait
  2. Wound wait
  3. Would wait
  4. 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.

  1. Time
  2. Stamp
  3. Timestamp
  4. 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.

  1. Not wait
  2. Wait
  3. Run
  4. 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





Comments and Discussions!

Load comments ↻





Copyright © 2024 www.includehelp.com. All rights reserved.