Answered step by step
Verified Expert Solution
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:
Read the input files, and verify that the dimensions are consistent.
Detect whether or not there is a deadlock condition.
If the system is deadlocked, list the processes that are deadlocked.
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
Allocation
Process,ResourceA,ResourceB,ResourceC,ResourceD,ResourceE
P
P
P
P
P
P
P
P
P
P
Request
Process,ResourceA,ResourceB,ResourceC,ResourceD,ResourceE
P
P
P
P
P
P
P
P
P
P
Available
ResourceA,ResourceB,ResourceC,ResourceD,ResourceE
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
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