Explanation:
· The Resource Allocation Graph (RAG) above is composed of 3 processes and four resources.
· R1 or resource 1 is composed of only one instance
· R2 has 2 instances
· R3 has one instance
· R4 has 3 instances
· P1 requests instance of R1
· P2 is holding an instance of R1
· P2 requests instance of R3
· P3 holds an instance of R3
· There is no deadlock found
Explanation:
· The Resource Allocation Graph (RAG) above is composed of 3 processes and four resources.
· R1 or resource 1 is composed of only one instance
· R2 has 2 instances
· R3 has one instance
· R4 has 3 instances
· P1 requests instance of R1
· P2 is holding an instance of R1
· P2 requests instance of R3
· P3 holds an instance of R3
· P3 requests an instance of R1
· There is deadlock based of the RAG no. 2 because all of the instances of R2 are held by the P1 and P2, then P3 is requesting for instances of R2. R2 cannot give any instances to P3 that is why a deadlock occurred.
· The Resource Allocation Graph (RAG) above is composed of4 processes and 2 resources.
· R1 and R2 has composed of 2 instances
· P1 requests instance of R1
· P2 is holding an instance of R1
· P3 also holds an instance of R1
· P3 requests an instance of R2
· P4 holds an instance of R2
· P1 also holds an instance of R2
· There is no deadlock.
· The Resource Allocation Graph (RAG) above is composed of 2 processes and 2 resources.
· P1 holds an instance of R1
· P2 requests an instance of R1
· P1 and P2 may request an instance of R2
5. Example of Resource Allocation Graph
· The RAG above is compose of 2 resources and 2 processes
· P1 holds an instance of R1
· P2 is requesting an instance of R1
· P2 holds an instance of R2
· P1 may request an instance of R2