Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider a system that has N processes, and M resources, and each resource has multiple instances. You are provided with the following input files: [

Consider a system that has N processes, and M resources, and each resource has multiple instances.
You are provided with the following input files: [samples are attached]
Allocation.csv Represents the NxM allocation matrix.
Request.csv Represents the NxM request matrix.
Available.csv Represents the M available vector.
Your task is to:
1- Read the input files, and verify that the dimensions are consistent.
2- Detect whether or not there is a deadlock condition.
3- If the system is deadlocked, list the processes that are deadlocked.
4- If not, show a series of process executions that are possible without deadlock.
For this assignment, you may use any programming language of your choosing.
I would like you to write a C code on the Lenox operating system that you should use like these libraries #include , #include , #include , #include , #include , #include .
Where you must read this informations from the file
These are three files
1- Allocation
Process,ResourceA,ResourceB,ResourceC,ResourceD,ResourceE
P1,5,6,0,3,1
P2,1,0,6,5,4
P3,2,4,1,0,2
P4,4,3,2,0,4
P5,6,2,3,2,2
P6,1,1,3,2,3
P7,0,0,5,1,1
P8,0,5,7,3,0
P9,2,6,0,5,0
P10,3,7,1,6,2
2- Request
Process,ResourceA,ResourceB,ResourceC,ResourceD,ResourceE
P1,2,0,4,5,5
P2,3,4,2,2,3
P3,0,3,3,4,4
P4,1,2,1,1,2
P5,3,1,4,4,1
P6,2,5,5,3,4
P7,0,3,2,2,3
P8,2,2,1,1,2
P9,3,1,6,0,1
P10,5,0,3,3,4
3- Available
ResourceA,ResourceB,ResourceC,ResourceD,ResourceE
2,0,2,1,3
Note that: this information that you will put them in the file they will lead to deadlock so for example you should increase the numbers in the available. Besides, you should check if the values that I gave them to you if they are correct or not (consistent) for example if process number in file different from another file then the program should give an error or the resources number are not similar in two different files

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introductory Relational Database Design For Business With Microsoft Access

Authors: Jonathan Eckstein, Bonnie R. Schultz

1st Edition

1119329418, 978-1119329411

More Books

Students also viewed these Databases questions

Question

What is Change Control and how does it operate?

Answered: 1 week ago

Question

How do Data Requirements relate to Functional Requirements?

Answered: 1 week ago