Question: 1. A system has Five processes (P1, P2, P3,P4, P5) and Four reusable resources (R1, R2, R3, R4). There is three instances of R1, two

1. A system has Five processes (P1, P2, P3,P4, P5) and Four reusable resources (R1, R2, R3, R4). There is three instances of R1, two instances of R2,one instance of R3 and two instances of R4. The allocation of resources for the five processes in the system are given as fallows: - P1 holds an instance of R1 and is requesting an instance of R2. - P2 holds an instance of R2 and is requesting an instance of R3. - P3 holds an instance of R3 and is requesting an instance of R4. - P4 holds an instance of R2 and R4 and is requesting an instance of R1. - P5 holds an instance of R4. i. Draw the resource allocation graph for this situation? ii. Write all the cycle(s) in the graph? iii. Does a deadlock exist? Why? [2.0 Marks] 2. A System the uses Banker's Deadlock Avoidance algorithm has Six processes P1,P2,P3,P4,P5 and P6 and uses resources of four different types A,B,C and D. There are Multiple instances of each resource type. Answer the following Questions: a. What are the total number of resources in the system? b. Is the state of the system is SAFE? Explain You answer? c. If the system is safe, show how all the process could complete their execution successfully? d. If the system is UNSAFE, show how deadlock might occur? [3.0Marks] 3. Use the following major Memory Allocation schemes to solve the given problem: The memory partitions given are 200KB,400KB,600KB,500KB,300KB and 250KB (in order). Apply the first-fit, best-fit, and worst-fit algorithms to place processes of 350KB,215KB,470KB and 490KB (in order) to the given memory partitions. a. First-fit b. Best-fit c. Worst-fit
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
