You are given a system of 4 processes (P1-P4) and 5 resource types R1-R5, one instance of each. The current state is as follows:P1 is holding R1 and waiting on R4. P2 is holding R2 and waiting on R3 and R5. P3 is holding R3 and R4, and waiting on R5. P4 is holding R5. Draw a resource allocation graph and a wait-for-graph. From WFG, determine if there is a deadlock? Explain your answer.
Expert Answer



Wait for Graph (WFG):-It is used to deadlock. If WFG contains a directed cycle then there will be a deadlock.
Don't use plagiarized sources. Get Your Custom Essay on
Answered! You are given a system of 4 processes (P1-P4) and 5 resource types R1-R5, one instance of each. The current state is…
GET AN ESSAY WRITTEN FOR YOU FROM AS LOW AS $13/PAGE
WFG is made from Resource allocation graph . WFG contain only process and their dependency on other processes.