Question: Q24) (Deadlock Detection) A system has four processes and five allocatable resources. The current allocation and maximum needs are given in the tables below: (the
Q24) (Deadlock Detection) A system has four processes and five allocatable resources. The current allocation and maximum needs are given in the tables below: (the five numbers represent five resources, in their respective order). Matrix "Allocated" shows the current resources held by the processes. Matrix "Maximum" shows the requested (extra) resources needed by the processes. And Vector E shows the total amount of resources available for all the processes.
Allocated | Maximum | Available | ||||||||||||||||
| Proc A | 1 | 0 | 2 | 1 | 1 | Proc A | 1 | 1 | 2 | 1 | 3 | 0 | 0 | x | 1 | 2 | ||
| Proc B | 2 | 0 | 1 | 1 | 0 | Proc B | 2 | 2 | 2 | 1 | 0 | |||||||
| Proc C | 1 | 1 | 0 | 1 | 0 | Proc C | 2 | 1 | 3 | 1 | 0 | |||||||
| Proc D | 1 | 1 | 1 | 1 | 0 | Proc D | 1 | 1 | 2 | 2 | 1 | |||||||
a) What is the smallest value of x for which this is a safe state? Justify your answer.
b) If a new request from a process Proc D arrives for (0, 0, 1, 0, 0), can the request be immediately granted based on the value of x found on part a? Why or why not? If yes, show an execution order, using an x value that may satisfy your answer.
Step by Step Solution
3.46 Rating (153 Votes )
There are 3 Steps involved in it
To solve the problem of deadlock detection in this system we need to use concepts from operating systems specifically those related to resource alloca... View full answer
Get step-by-step solutions from verified subject matter experts
