BE SURE TO: a) How the program is run. What it uses to read in the file (scanf, read, regex, etc). What data structure in memory it uses to store the input data (it reads in an adjacency matrix, but can use an adjacency list or a graph using pointers). Description of the algorithm and how it works. b) Implementation of your deadlock detection algorithm. Can read the input file, and attempts to solve the problem. Input can be piped into stdin, or read from a file or some other ungodly solution like reading the file at compile time. The important thing is the given input works unaltered, and any extra input files with the same structure work too. c) Correctness (your algorithm will be tested with different graphs) d) Discussion of experimental results in the report. What inputs you tried and if they passed. Any quirks of your system, like if it takes a large amount of time or memory. Your task is to develop a system that can determine whether or not a particular resource allocation graph represents a deadlock state. A resource allocation graph, G(V,E) can be represented as an adjacency matrix M. For example: B3 R3 P3 P2 R1 Χ P1 P2 P3 R1 R2 R3 14 P1 P1 1 0 0 0 1 0 P2 0 1 0 1 0 1 P30 0 1 0 0 0 R1 1 0 1 1 0 0 R2 82 R2 0 1 0 0 1 0 R3 0 0 1 0 0 1 Your program must read a text file which specifies the number of processes; the number of resources; the number of units of each type of resource; and the adjacency Matrix M. Your program will determine if the state represented by M is a deadlock. You may assume that the system's resource allocation policy is expedient! A text file containing information corresponding to the above example has been posted to Canvas (in the Modules section next to this project). Your program must be capable of reading text files which conform to the specification described within this file. Thus, your program may be graded using a different text file which conforms to the same specification. You may choose to implement either one of the following deadlock detection mechanisms: OPTION 1 You may choose to implement the graph reduction algorithm to determine whether the graph represented by M is completely reducible and hence deadlock free. OPTION 2 You may determine that the state represented by G(V,E) or M is a deadlock state by inspecting the resource allocation graph for the existence of a knot.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

please help for parts A,B,C,D of this question. You can choose which option you want to pick for the problem. 

BE SURE TO:
a) How the program is run. What it uses to read in the file (scanf, read, regex, etc). What data
structure in memory it uses to store the input data (it reads in an adjacency matrix, but can use
an adjacency list or a graph using pointers). Description of the algorithm and how it works.
b) Implementation of your deadlock detection algorithm. Can read the input file, and attempts to
solve the problem. Input can be piped into stdin, or read from a file or some other ungodly
solution like reading the file at compile time. The important thing is the given input works
unaltered, and any extra input files with the same structure work too.
c) Correctness (your algorithm will be tested with different graphs)
d) Discussion of experimental results in the report. What inputs you tried and if they passed.
Any quirks of your system, like if it takes a large amount of time or memory.
Transcribed Image Text:BE SURE TO: a) How the program is run. What it uses to read in the file (scanf, read, regex, etc). What data structure in memory it uses to store the input data (it reads in an adjacency matrix, but can use an adjacency list or a graph using pointers). Description of the algorithm and how it works. b) Implementation of your deadlock detection algorithm. Can read the input file, and attempts to solve the problem. Input can be piped into stdin, or read from a file or some other ungodly solution like reading the file at compile time. The important thing is the given input works unaltered, and any extra input files with the same structure work too. c) Correctness (your algorithm will be tested with different graphs) d) Discussion of experimental results in the report. What inputs you tried and if they passed. Any quirks of your system, like if it takes a large amount of time or memory.
Your task is to develop a system that can determine whether or not a particular resource
allocation graph represents a deadlock state. A resource allocation graph, G(V,E) can be
represented as an adjacency matrix M.
For example:
B3
R3
P3
P2
R1
Χ
P1
P2
P3
R1
R2
R3
14
P1
P1
1
0
0
0 1
0
P2 0
1
0 1
0
1
P30
0
1
0
0
0
R1 1
0
1
1
0
0
R2
82
R2 0
1
0
0
1
0
R3 0
0
1
0
0
1
Your program must read a text file which specifies the number of processes; the number of
resources; the number of units of each type of resource; and the adjacency Matrix M. Your
program will determine if the state represented by M is a deadlock. You may assume that the
system's resource allocation policy is expedient!
A text file containing information corresponding to the above example has been posted to
Canvas (in the Modules section next to this project). Your program must be capable of reading
text files which conform to the specification described within this file. Thus, your program may
be graded using a different text file which conforms to the same specification.
You may choose to implement either one of the following deadlock detection mechanisms:
OPTION 1 You may choose to implement the graph reduction algorithm to determine whether
the graph represented by M is completely reducible and hence deadlock free.
OPTION 2 You may determine that the state represented by G(V,E) or M is a deadlock state by
inspecting the resource allocation graph for the existence of a knot.
Transcribed Image Text:Your task is to develop a system that can determine whether or not a particular resource allocation graph represents a deadlock state. A resource allocation graph, G(V,E) can be represented as an adjacency matrix M. For example: B3 R3 P3 P2 R1 Χ P1 P2 P3 R1 R2 R3 14 P1 P1 1 0 0 0 1 0 P2 0 1 0 1 0 1 P30 0 1 0 0 0 R1 1 0 1 1 0 0 R2 82 R2 0 1 0 0 1 0 R3 0 0 1 0 0 1 Your program must read a text file which specifies the number of processes; the number of resources; the number of units of each type of resource; and the adjacency Matrix M. Your program will determine if the state represented by M is a deadlock. You may assume that the system's resource allocation policy is expedient! A text file containing information corresponding to the above example has been posted to Canvas (in the Modules section next to this project). Your program must be capable of reading text files which conform to the specification described within this file. Thus, your program may be graded using a different text file which conforms to the same specification. You may choose to implement either one of the following deadlock detection mechanisms: OPTION 1 You may choose to implement the graph reduction algorithm to determine whether the graph represented by M is completely reducible and hence deadlock free. OPTION 2 You may determine that the state represented by G(V,E) or M is a deadlock state by inspecting the resource allocation graph for the existence of a knot.
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education