191k views
1 vote
If the wait for graph contains a cycle :

a) Then a deadlock does not exist
b) Then a deadlock exists
c) Then the system is in a safe state
d) Either b or c

User Wittakarn
by
8.3k points

1 Answer

4 votes

Final answer:

A cycle in a wait-for graph indicates that there is a deadlock condition in the system, as it shows a set of processes that are all waiting on each other to release resources.

Step-by-step explanation:

If the wait-for graph contains a cycle, then option b, 'Then a deadlock exists,' is the correct answer. A wait-for graph is a directed graph used to represent waiting relationships between processes in a system. Each node represents a process, and an edge from process A to process B implies that process A is holding a resource that process B is waiting to acquire. In operating systems, the presence of a cycle in the wait-for graph indicates that there is a set of processes each waiting for the next to release a resource. This forms a deadlock, as none of the processes can proceed until one releases its resources, which it is not willing to do until it acquires the resources it is waiting for. Hence, if a wait-for graph contains a cycle, it is a clear indication of a deadlock condition.

User Safety
by
7.3k points