Generic selectors
Exact matches only
Search in title
Search in content
Search in posts
Search in pages
Filter by Categories
nmims post
Objective Type Set
Online MCQ Assignment
Question Solution
Solved Question
Uncategorized

1. A system is in a _______ state if there exists a set of transactions in which every transaction is waiting for another transaction in the set.
a) Deadlock
b) Starved
c) Isolated
d) None of the mentioned

View Answer

Answer: a [Reason:] A system is in a deadlock state if there exists a set of transactions in which every transaction is waiting for another transaction in the set.

2. Which of the following is not a method in deadlock handling
a) Deadlock prevention
b) Deadlock detection
c) Deadlock recovery
d) Deadlock distribution

View Answer

Answer: d [Reason:] Deadlock distribution is not a method in deadlock handling whereas, deadlock prevention is followed by deadlock detection and deadlock recovery.

3. Deadlocks can be prevented using
a) Preemption and transaction rollbacks
b) Wait and die scheme
c) Wound-wait scheme
d) All of the mentioned

View Answer

Answer: d [Reason:] Preemption and transaction rollbacks, wait and die scheme, wound wait scheme are all different methods of deadlock prevention.

4. State true or false: Wait die scheme is a non-preemptive technique
a) True
b) False

View Answer

Answer: a [Reason:] The wait-die scheme is a non-preemptive technique. When transaction Ti requests a data item currently held by Tj , Ti is allowed to wait only if it has a timestamp smaller than that of Tj (that is, Ti is older than Tj ). Otherwise, Ti is rolled back (dies).

5. Lock timeouts have which of the following advantages?
a) Unnecessary rollbacks do not occur
b) Transactions do not starve
c) It is easy to implement
d) All of the mentioned

View Answer

Answer: d [Reason:] In lock timeout method, unnecessary rollbacks do not occur, transactions do not starve and it is also easy to implement and is hence widely used if transactions are short and long waits are likely to be due to deadlocks.

6. The _________ graph describes deadlocks precisely
a) Wound wait graph
b) Wait die graph
c) Wait for graph
d) None of the mentioned

View Answer

Answer: c [Reason:] The wait for graph describes deadlocks precisely. Existence of a cycle in this graph implies that a deadlock will occur.

7. How do we generally recover from a deadlock?
a) By aborting all the transactions
b) By rolling back all the transactions
c) By rolling back only a selected number of transactions
d) None of the mentioned

View Answer

Answer: c [Reason:] We generally recover from deadlocks by rolling back only a selected number of transactions

8. State true or false: Partial rollback is not possible.
a) True
b) False

View Answer

Answer: b [Reason:] Partial rollback is possible but it requires the system too maintain an additional amount of information on the states of the transactions.

9. Which of the following steps must be taken while choosing a victim?
a) Avoiding starvation
b) Number of transactions involved in rollback
c) Data items used by the transaction
d) All of the mentioned

View Answer

Answer: d [Reason:] While choosing a victim we much choose the one with a minimum cost. That is the one which avoids starvation, the one with the least number of transaction involved in the rollback and the one with the least amount of data items used.