Question: Question4 Part 1 Given the Dining-Philosophers Problem seen in the class i. Give a scenario where the system might be in a deadlock. ii. How

Question4 Part 1 Given the Dining-Philosophers Problem seen in the class i. Give a scenario where the system might be in a deadlock. ii. How we can avoid the deadlock problem? Give two possible solutions. ili. How many philosophers can eat at the same time? a do wait ( chopstick[i]); wait ( chopstick[(i + 1) 51 ); (RICE) eat signal (chopstick[i]); signal (chopstickt (1 + 1)^5]); // think } while (TRUE); Part2 P1, P2 A system has three processes executing and competing for 3 resource types. Processes set: {P1, P2, P3} Resources set: {R1, R2, R3} Request and assignment edges set: {P1 R2, PI R3, R3 P2, R2 P2, R2 P3, RI P3, R1 RI) Resource RI: has 2 instances Resource R2: has 2 instances Resource R3: has 1 instance a. Draw the resource allocation graph based on the information given above. b. Identify the cycle(s) available in the graph (if any). Then justify if there is a deadlock or not. c
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
