Ans is : Option A, D.
- The four necessary conditions for deadlock to happen are: Mutual Exclusion, Hold and Wait, No Pre-emption, Circular Wait. Hence option A is True.
- Here they have asked about the wait-for graph. A wait-for graph is a directed graph used for deadlock detection in operating systems and relational database systems (Wikipedia). We must note that “The wait-for graph scheme is not applicable to a resource-allocation system with multiple instances of each resource type.” (Galvin Pg:338 Article 8.7.2). This makes option B, False.
An excerpt from Galvin (Pg: 337 Article 8.7.1) for more clarity on Wait-for Graph on Single Instance Resource: -
If all resources have only a single instance, then we can define a deadlock-detection algorithm that uses a variant of the resource-allocation graph, called a wait-for graph. We obtain this graph from the resource-allocation graph by removing the resource nodes and collapsing the appropriate edges. More precisely, an edge from Ti to Tj in a wait-for graph implies that thread Ti is waiting for thread Tj to release a resource that Ti needs. An edge Ti → Tj exists in a wait-for graph if and only if the corresponding resource-allocation graph contains two edges Ti → Rq and Rq → Tj for some resource Rq. In Figure 8.11, we present a resource-allocation graph and the corresponding wait-for graph.

Thus, every cycle in a multi-instance resource type (In a system where each resource has more than one instance) wait-for graph (which is not even possible) is not a deadlock. Hence option B is False.
But in the case of a single-instance resource type a cycle in its wait-for graph indicates the presence of a deadlock.
- Every unsafe state doesn’t necessarily mean that a deadlock would occur. Deadlock is a subset of an unsafe state. Hence option C is False.

- In Resource Allocation graph, if every edge is an assignment edge, it means there are no future resource requirements. So the resources requirements of all the processes are already satisfied. The necessary condition of Hold and Wait is not fulfilled, as system is not waiting for any resource. Hence deadlock cannot occur. Therefore, option D is True.