Question
1. Problem Description Lab 7. Deadlock Detection In this lab, you are asked to apply Bankers Algorithm to deadlock detection. Please refer to the course
1. Problem Description
Lab 7. Deadlock Detection
In this lab, you are asked to apply Bankers Algorithm to deadlock detection. Please refer to the course slides on Deadlock Detection. Your program should ask the user to specify an input file. The format of the input file is described below. The program will run the algorithm and display a message stating either that there is a deadlock or that there is not. If there is a deadlock, list the processes that are involved in the deadlock. Then you will give the user a chance to run another set of data.
2. Input Data Format
Number of processes (N) (in black) Number of Resource Types (M) (in teal) Available (unallocated) instances of each resource - 1 line of M numbers (in red) Allocation matrix - N lines of M numbers (in green bold) Request Matrix - N lines of M numbers (in blue italic)
Sample input data:
5
3
000
010 200 303 211 002000 202 001 100 002
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