Questions: Deadlock Prevention and Avoidance Strategies

5 questions to test your understanding

Score: 0 / 5
Question 1 Multiple Choice

A system assigns global numbers to all resources and requires processes to request resources only in increasing numeric order. Suppose process A holds resource 3 and wants resource 5, while process B holds resource 5 and wants resource 3. What happens?

AA deadlock occurs because A and B are waiting for each other's resources
BProcess B is blocked from requesting resource 3 because 3 < 5, preventing circular wait
CThe system detects the circular wait and kills one of the processes
DBoth processes proceed because their requests don't violate the ordering rule
Question 2 Multiple Choice

The Banker's algorithm denies a resource request even when the resources are currently available. Under what condition does this happen?

AWhen granting the request would leave the system with fewer than two free resources
BWhen the requesting process has not declared its maximum resource needs in advance
CWhen granting the request would leave the system in an unsafe state — no sequence exists in which all processes can complete
DWhen the request would cause the system's total allocated resources to exceed 80% of total capacity
Question 3 True / False

Deadlock prevention and deadlock avoidance both break the circular-wait condition before it occurs.

TTrue
FFalse
Question 4 True / False

Resource ordering (assigning global numbers and requiring increasing-order requests) is a deadlock prevention strategy that works by making circular wait impossible.

TTrue
FFalse
Question 5 Short Answer

What is the fundamental difference between deadlock prevention and deadlock avoidance as strategies, and why does that difference affect how much concurrency each permits?

Think about your answer, then reveal below.