Question: a=1, b=2 One computer system consists of five processes, P1 to P5, and four resources R1 to R4. The total number of resources available is


a=1, b=2
One computer system consists of five processes, P1 to P5, and four resources R1 to R4. The total number of resources available is shown below: R1 6 Resource Vector R2 R3 9 7 R4 9 Each process states the maximum number of resources needed for completion, as shown in the Claim matrix below: Process R1 P1 P2 P3 P4 P5 3 5 3 5 2 R2 4 3 3 5 3 Claim R3 4 4 2 3 2 R4 2 2 4 4 3 At time t, resources are allocated to processes as shown in the Allocation matrix below. Process R4 1 0 P1 P2 P3 P4 P5 Allocation R2 R3 2 2 2 1 2 0 0 2 1 1 R1 0 2 1 1 0 a 2 b Use the following values for a and b based on the 7th digit of your student ID (n): Value of n Even Odd Values for a and b a= 1, b=2 a=2, b= 1 For example, if your student ID is 19465849A, n is even, a = 1 and b = 2. (a) Use Banker's Algorithm to determine if the state at time t is safe or not. If so, give a safe sequence of process execution, and show how many resources are available as each process terminates. (10 marks) (b) Following part (a) above, if a request (1, 0, 0, 0) from P1 arrives, should the request be granted? Justify your decision. (5 marks) (c) Following part (a) above, is there any resource request from P1 that can be granted? Justify your answer. If so, state such resource request, give a safe sequence of process execution, and show how many resources are available as each process terminates. One computer system consists of five processes, P1 to P5, and four resources R1 to R4. The total number of resources available is shown below: R1 6 Resource Vector R2 R3 9 7 R4 9 Each process states the maximum number of resources needed for completion, as shown in the Claim matrix below: Process R1 P1 P2 P3 P4 P5 3 5 3 5 2 R2 4 3 3 5 3 Claim R3 4 4 2 3 2 R4 2 2 4 4 3 At time t, resources are allocated to processes as shown in the Allocation matrix below. Process R4 1 0 P1 P2 P3 P4 P5 Allocation R2 R3 2 2 2 1 2 0 0 2 1 1 R1 0 2 1 1 0 a 2 b Use the following values for a and b based on the 7th digit of your student ID (n): Value of n Even Odd Values for a and b a= 1, b=2 a=2, b= 1 For example, if your student ID is 19465849A, n is even, a = 1 and b = 2. (a) Use Banker's Algorithm to determine if the state at time t is safe or not. If so, give a safe sequence of process execution, and show how many resources are available as each process terminates. (10 marks) (b) Following part (a) above, if a request (1, 0, 0, 0) from P1 arrives, should the request be granted? Justify your decision. (5 marks) (c) Following part (a) above, is there any resource request from P1 that can be granted? Justify your answer. If so, state such resource request, give a safe sequence of process execution, and show how many resources are available as each process terminatesStep by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
