Deadlocks - deadlock characterization, prevention, avoidance, detection and recovery methods - One Line Questions
1.
A cycle in a Resource Allocation Graph with multiple instances of each resource type implies: —
A necessary but not sufficient condition for deadlock.
2.
Which of the following is a characteristic of the 'Circular Wait' condition for deadlock? —
A set of processes {P0, P1, ..., Pn} exists such that P0 is waiting for a resource held by P1, P1 is waiting for a resource held by P2, ..., and Pn is waiting for a resource held by P0.
3.
Which of the following is a characteristic of the 'Hold and Wait' condition for deadlock? —
A process holds at least one resource and waits for another resource held by a different process.
4.
What is the 'Mutual Exclusion' condition for deadlock? —
At least one resource must be held in a non-sharable mode; otherwise, no deadlock can occur.
5.
Which recovery strategy involves aborting all deadlocked processes? —
Abort all deadlocked processes
6.
When recovering from a deadlock by aborting a process, what is a common strategy to minimize cost? —
Abort the process that has made the least progress.
7.
Which of the following is a strategy for deadlock prevention by ensuring that once a process has started using a resource, it cannot be preempted? —
Ensuring that processes are not allowed to hold resources indefinitely.
8.
Which of the following is a deadlock detection algorithm that relies on checking for cycles in a graph? —
Wait-for Graph Cycle Detection
9.
Which deadlock avoidance algorithm dynamically examines the resource allocation state to ensure that there is never a state where a circular wait condition can occur? —
Banker's Algorithm
10.
Which of the following is a deadlock detection algorithm that uses a wait-for graph? —
Cycle Detection Algorithm
11.
The Banker's Algorithm is primarily used for: —
Deadlock Avoidance
12.
Which of the following is a deadlock prevention technique that involves ordering all resource types? —
Disallow Circular Wait
13.
Which deadlock prevention strategy involves ordering all resource types and requiring processes to request resources in increasing order of enumeration? —
Disallowing Circular Wait
14.
Which of the following is a method of deadlock prevention that involves ensuring that processes do not request resources in a circular manner? —
Disallowing Circular Wait
15.
Which of the following is a deadlock prevention strategy that requires a process to request all of its resources at one time? —
Disallowing Hold and Wait
16.
Which of the following is a characteristic of the 'No Preemption' condition for deadlock? —
Resources can only be released voluntarily by the process holding them.
17.
Which condition is violated by setting all resources to be shareable? —
Mutual Exclusion
18.
Which condition for deadlock is violated if a process can be forced to release its resources even if it is still using them? —
No Preemption
19.
If a process is preempted and its resources are taken away, which deadlock condition is being violated? —
No Preemption
20.
Which condition for deadlock is violated if a process releases all its resources before acquiring new ones? —
Hold and Wait
21.
Which of the following is a condition for deadlock that states that a process will not be preempted until it voluntarily releases the resource? —
No Preemption
22.
Which of the following conditions is NOT necessary for a deadlock to occur? —
Progress
23.
In deadlock prevention, which condition is violated by ensuring that every process requests all its resources before it starts execution? —
Hold and Wait
24.
Which condition for deadlock is violated if a process can be forced to relinquish resources it holds? —
No Preemption
25.
In deadlock avoidance, a 'safe state' guarantees that: —
The system can allocate resources to each process in some sequence without causing deadlock.
26.
When recovering from a deadlock by preempting resources, what is a critical consideration? —
Preempting from a process that will not require the resource again.
27.
What is the fundamental difference between deadlock prevention and deadlock avoidance? —
Prevention actively prevents deadlock conditions, while avoidance dynamically checks for safe states.
28.
Which deadlock recovery strategy involves choosing a process and preempting its resources until the deadlock is resolved? —
Resource Preemption
29.
Which method of deadlock recovery involves selecting a process and restarting it from a previous checkpoint? —
Rollback
30.
If a deadlock is detected, which of the following is NOT a common recovery strategy? —
System reboot.
31.
Which of the following is a condition that MUST hold for a deadlock to occur? —
Mutual Exclusion
32.
What is the 'Progress' condition, which is NOT necessary for deadlock, often related to? —
Process scheduling and execution order
33.
Which of the following is a method to recover from deadlock by selecting a victim process and aborting it? —
Process Termination
34.
In deadlock recovery, what is the process of 'Rollback'? —
Restoring a process to a previously defined safe state.
35.
In a Resource Allocation Graph, a cycle indicates: —
A potential for deadlock, or an actual deadlock if there is only one instance per resource type.
36.
In the Banker's Algorithm, what does the 'Max' matrix represent? —
The maximum number of resources of each type that a process may request.
37.
In the Banker's Algorithm, what does the 'Need' matrix represent? —
The remaining resources of each type that a process may still request to complete its task.
38.
When recovering from a deadlock by preempting resources, what is a common criterion for selecting a victim process? —
The process that has the lowest priority.
39.
In the Banker's Algorithm, if a process requests more resources than its maximum declared need, what is the consequence? —
The request is denied, and the process may be terminated.
40.
In the context of deadlock avoidance, what does the 'Available' vector represent in the Banker's Algorithm? —
The number of instances of each resource type currently available for allocation.
41.
A state is considered 'safe' in the Banker's Algorithm if: —
The system can allocate resources to each process in some order and still avoid deadlock.
42.
Which of the following is a disadvantage of deadlock prevention techniques? —
They reduce resource utilization and system throughput.
43.
What is the main challenge with deadlock detection algorithms? —
They can be computationally expensive, especially with many processes and resources.
44.
What is a potential disadvantage of using deadlock prevention methods? —
They can significantly reduce the degree of concurrency and system utilization.
45.
What is the primary goal of deadlock avoidance algorithms? —
To prevent deadlocks by ensuring safe states.
46.
What is the primary goal of deadlock detection algorithms? —
To identify when a deadlock has occurred and take action.
47.
What is the purpose of the 'Allocation' matrix in the Banker's Algorithm? —
To track the resources currently held by each process.
48.
Which of the following is a method for deadlock detection that involves maintaining a matrix of available resources and resource requests? —
Algorithm based on available and allocation matrices
49.
Which of the following is a common representation for detecting deadlocks in a system with multiple instances of each resource type? —
Detection Algorithm using Available and Allocation Matrices
50.
Which of the following is a method of deadlock detection that works by trying to find a sequence of process completions? —
Detection Algorithm based on Available and Allocation Matrices