Simulation Of Deadlock Detection

For this assignment, you will write a program that simulates the execution of multiple processes with respect to their resource allocation and resource release requests, and detect when (or if) deadlock occurs. If deadlock occurs, your program will then display a list of the processes and resources involved in the deadlock.

Write and test a program (in C, C++, Java, or Python) to carry out the simulation of multiple processes executing the sequences of resource requests and computation specified by the input data, checking after each resource allocation request for the existence of deadlock by attempting to find a cycle in the resource graph. If no deadlocks occur during execution, then for each process indicate the total run time and the time when the process completed. If a deadlock does occur, indicate that fact, the time when the deadlock was detected, and the identification of the processes and resources involved in the circular wait. The samples shown below illustrate the desired output format. No extraneous output (e.g. debugging information) should appear in your output, and tracing information should not appear in the output from your solution. The program must read from the standard input and write to the standard output.

Let’s look at a complete example. Suppose we have three processes with execution action sequences as follows:

Process 1: L1 L2 C2 U1 U2

Process 2: L1 L2 C2 U1 U2

Process 3: L3 C5 U3 C2

Simulation 2 in the sample input and output (below) shows the sequence in which these process actions would occur, and the time (starting at 0) when they would occur.

The set of processes in simulation 2 does not deadlock, but obviously other sequences can (see the samples for several such sequences). To detect deadlock, your program must build a resource graph (with nodes for processes and resources, and directed edges indicating resource ownership and pending resource requests), and test the graph for the existence of a cycle after each resource allocation request is made by a process. This test must be performed after each successful or unsuccessful allocation.

The Input Data

The input data will consist of a sequence of simulation test cases identified by sequential numbers starting with 1. The first line of input for each test case will contain two integers that specify the number of processes (1 ≤ np ≤ 50) and the number of resources (1 ≤ nr ≤ 50). The remaining np lines in the test case specify the actions for each of the np processes, with line i + 1 of the test case input containing the action specifications for process i. Each action specification line contains an integer na (1 ≤ na ≤ 50) that specifies the number of actions for the process and then na action specifications, each consisting of an action type (L, U, or C) followed immediately by an integer. The last test case will be followed by a line containing two integer zeroes. Sample input and output appears below, and illustrates the input format.

There is code in C that is 75% code done. Just need to complete the rest. If you are okay with the project, I could send you the code. Or if you don't want to use this code, you could go from scratch.

Znanja: C programiranje, C++ programiranje, Java, Python, Arhitektura porgramske opreme

Več: Coding Implementation of deadlock detection algorithm, Eccentricity detection in induction machine simulation of induction motors with FEM in healthy and faulty operation, programming language used for researchers on automobile of expert systems for automobile fault detection, java, c programming, design a complete set of corporate identity for dots n coffee serves freshly rosated and brewed coffees, data mining of ucc leads for merchant cash advance business, d and 3d design of custom part for a machine, create an animation of a logo for intro to a video, create a monte carlo simulation of random source of packets that are received and, create 3d models of our products for architects interior designers, create 3d models of our products for architects / interior designers, clear cut and photoshop of vehicle images for website, benefits of raw feeding for dogs, architectural modelling of 5 floors of commercial space for use in an architectural visualisation process, adjustment of banner design for real estate company, adjustment of backend coding for

O delodajalcu:
( 0 mnenja ) United States

ID projekta: #15687795

15 freelancerjev ponuja v povprečju za $153 na tem delu


Hello, I'm Smile Song, developer in China. I'm interesting your project very well I'm a Good SQL, C++, c#, Python, .Net, swift, object-c, OpenCV, Math, Java, Algorithm expert. Relevant Skills and Experience I m quite Več

$144 USD v 3 dneh
(845 Ocen)

I am very proficient in c and c++. I have 16 years c++ developing experience now, and have worked for more than 6 years. My work is online game developing, and mainly focus on client side, using c++ under windows envir Več

$150 USD v 3 dneh
(157 Ocen)

tough stuff. can do this for you. Relevant Skills and Experience - python - multithreading Proposed Milestones $90 USD - simmulation 1 completed $60 USD - simmulation 2 completed

$150 USD v 2 dneh
(78 Ocen)

Hello, I am interested in your project. I have good experience in multi-process programming. So I hope sincerely you hire me. Relevant Skills and Experience C Programming, C++ Programming, Java, Python, Software Archi Več

$155 USD v 3 dneh
(88 Ocen)
$30 USD v 1 dnevu
(15 Ocen)

Hello We are highly motivated young technocrats from India. We are approachable, you can come to us if you have a struggle, we are happy to help. Team TiponTongue Relevant Skills and Experience Ph.D. in Computer S Več

$220 USD v 3 dneh
(27 Ocen)

Hi, Please award me for this assignment, I will do by Java. regards, Relevant Skills and Experience Java Proposed Milestones $111 USD - Completed

$111 USD v 3 dneh
(13 Ocen)

I would like to offer myself as a probable candidate for this assignment as I am confident of delivering a quality output. I have excellent expertise in this area. Relevant Skills and Experience I have total 7 years o Več

$155 USD v 3 dneh
(18 Ocen)

A proposal has not yet been provided

$155 USD v 3 dneh
(11 Ocen)

Hello Sir, We are Yontech softwares. We work in mobile applications , web applications , website development & design etc. We have expertise in working in Java , Android , PHP etc. We are looking forward to hearing Več

$166 USD v 3 dneh
(8 Ocen)

Hi, I am a talented C & C++ coder. I won the championship 4 times in the international online programming contest sponsored by India. If you give me this project, you will get good result. Thanks. Relevant Skills and Več

$400 USD v 7 dneh
(2 Ocen)
$200 USD v 3 dneh
(1 Ocena)
$55 USD v 3 dneh
(2 Ocen)

Experience C/C++ developer in Silicon Valley. Able to write simple code that does the task and easy to understand. Relevant Skills and Experience C/C++, Java using Eclipse IDE, Python. Debugging skills and also transl Več

$110 USD v 3 dneh
(2 Ocen)

Hey ! I'm SAYAN PROGRAMMER I've reviewed your complete job description, and I fulfill all the qualifications required for this project. I have completed 200 projects with clients 100% satisfaction and I am sure if Več

$100 USD v 3 dneh
(0 Ocen)