Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Code the following table of a system in C program with five processes (P1, P2, P3, P4, P5) and four resources (R1, R2, R3,
Code the following table of a system in C program with five processes (P1, P2, P3, P4, P5) and four resources (R1, R2, R3, R4), and recall the various deadlock detection and avoidance strategies we've examined in this course. Process P1 P2 P3 P4 P5 R1 0 2 0 2 0 Current Allocation R2 0 0 0 3 3 R3 1 2 0 3 5 3 R1 R4 19 2 0 4 4 2 R2 R1 1 0 2 6 4 0 Max Need R2 0 7 Currently Avallable Resources 6 3 6 R3 R4 2 0 a. Implement a program which returns the above system is in safe state or not? b. Implement a program for deadlock safety of above system? here you go sir edited R3 3 LO 5 5 5 5 R4 2 0 6 6 2 In this project you will develop a deadlock detection algorithm to determine whether a given system state, s, which is represented by a General Resource Graph, G(V.E), contains a set of processes that are deadlocked. The system is continuously keeping track of all the resource requests issued by processes and corresponding resource allocations. The state of the system is maintained by a set of edges, E = {(pi, rk), (rl, pj)}, which represents all requests and allocation in system states. You may assume that the system contains only reusable resources. The input to your algorithm may be an adjacency matrix or an edge list representing the set E of system states. The output of your algorithm is the list of processes that are deadlocked in states. Your algorithm will have to execute on any syntactically correct input. Deliverables: 1. A program that implements your deadlock detection algorithm. 2. At least three examples of executing the algorithm on three different General Resource Graphs 3. A short report (2-3 pages) describing the algorithm and a discussion of potential improvements that could lead to a more efficient deadlock detection.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started