Questions: Deadlock Conditions and Resource Graphs

5 questions to test your understanding

Score: 0 / 5
Question 1 Multiple Choice

Three processes each hold one resource and are each waiting for the resource held by the next process, forming a cycle. Each resource type has exactly one instance. You draw the resource allocation graph and find a cycle. What can you conclude?

ADeadlock is possible but not certain — you must run the Banker's Algorithm to confirm
BDeadlock is guaranteed — with single-instance resources, a cycle in the resource allocation graph is sufficient for deadlock
CNo conclusion is possible from the graph alone; you must check all four conditions independently
DDeadlock is guaranteed only if the cycle includes all processes in the system
Question 2 Multiple Choice

A system designer wants to prevent deadlock by eliminating one of the four necessary conditions. Which condition is MOST practically eliminable through system design?

AMutual exclusion — most resources can be made shareable if the OS is designed cleverly
BNo preemption — the OS can always safely force a process to release its resources
CHold-and-wait — processes can be required to request all resources at once before starting
DCircular wait — it is impossible to impose a global ordering on arbitrary resource types
Question 3 True / False

In a resource allocation graph, if every resource type has multiple instances, a cycle is necessary but not sufficient for deadlock.

TTrue
FFalse
Question 4 True / False

A cycle in a resource allocation graph usually guarantees that deadlock exists, regardless of how many instances each resource type has.

TTrue
FFalse
Question 5 Short Answer

Why does breaking the circular-wait condition — for example, by imposing a global numeric ordering on resource types — prevent deadlock, even though processes can still hold multiple resources while waiting?

Think about your answer, then reveal below.