Case Study-Question-3
Case Study-Question-3
Case Study-Question-3
Request[P2]= 0 4 2 0
• To decide whether the request is granted, we use Resource Request algorithm.
Step 1: Request[P2]<=Need[P2] i.e. (0 4 2 0) <= (0
7 5 2) true. Step 2: Request[P2]<=Available i.e.
(0 4 2 0) <= (1 5 2 0) true.
Step 3: Available = Available – Request[P2] = (1 5 2 0) - (0 4 2 0)= (1 1 0 0)
Allocation[P2] = Allocation[P2] + Request[P2] = (1 0 0 0) + (0 4
2 0)= (1 4 2 0) Need[P2] = Need[P2] – Request[P2] = (0 7 5 2) -
(0 4 2 0)= (0 3 3 2)
• We arrive at the following new system state