A number of processes could be in a deadlock state if none of them can execute…

PYQ GATE 1988

A number of processes could be in a deadlock state if none of them can execute due to non-availability of sufficient resources. Let Pᵢ, 0≤i≤4 represent five processes and let there be four resources types rⱼ, 0≤j≤3. Suppose the following data structures have been used.

Available: A vector of length 4 such that if Available[i]=k, there are k instances of resource type rⱼ available in the system.

Allocation: A 5×4 matrix defining the number of each type currently allocated to each process.

Max: A 5×4 matrix indicating the maximum resource need of each process.

Assume that system allocated resources only when it does not lead into an unsafe state such that resource requirements in future never cause a deadlock state.

Allocation rows P₀..P₄: [0,0,1,2]; [1,0,0,0]; [1,3,5,4]; [0,6,3,2]; [0,0,1,4].

Max rows P₀..P₄: [0,0,1,2]; [1,7,5,0]; [2,3,5,6]; [0,6,5,2]; [0,6,5,6].

Available: [1,5,2,0].

Is the system currently in a safe state? If yes, explain why.

Sign up free to check your answer

Sign up free

Explore the full course: Operating System

Loading lesson…