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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!