Question: A system is currently executing 3 user processes P1, P2 and P3. Each process requires certain number of instances of a resource type R

A system is currently executing 3 user processes P1, P2 and P3. Each process requires certain number of 

A system is currently executing 3 user processes P1, P2 and P3. Each process requires certain number of instances of a resource type R - P1 requires a maximum of 2 instances of resource type R, P2 requires a maximum of 3 instances of resource type R, P3 requires a maximum of 4 instances of resource R. The problem is to determine how many total number of instances of resource type R will be required to avoid deadlocks. Note: The ordering in which resources are requested can make a difference. Let there be 4 total instances of resource type R. Let us assume that P1, P2, P3 are each allocated one instance of R. IF P2 or P3 get the last available instance, a deadlock will ensue. What is the minimum number of units of R that ensures that a deadlock cannot occur? Ans: Explanation:

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

This problem is related to resource allocation in a system and the avoidance of deadlocks which occur when resources are inadequately managed such tha... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!