Closed

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.

Skills: C Programming, C++ Programming, Java, Python, Software Architecture

See more: 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, 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

About the Employer:
( 0 reviews ) United States

Project ID: #15687795

22 freelancers are bidding on average $146 for this job

Yknox

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 More

$144 USD in 3 days
(699 Reviews)
8.9
hbxfnzwpf

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 More

$150 USD in 3 days
(141 Reviews)
7.0
algispetkuns

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 in 2 days
(60 Reviews)
5.7
Gaosong2017

Honorable Seniors.I have experience in developing C++, Java, Python developer with 7+ years. I can complete your project perfectly because I have experience in that filed. Relevant Skills and Experience - Desktop Appl More

$120 USD in 3 days
(19 Reviews)
5.3
amariitism

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 More

$220 USD in 3 days
(25 Reviews)
5.1
travisyates31

Hello I have read your post carefully and feel very confident on your job As you can see in my profile , I am python and math expert, So I can help you using python Please discuss about your project. Relevant Skills More

$200 USD in 3 days
(21 Reviews)
4.6
kcbStar

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 More

$155 USD in 3 days
(21 Reviews)
4.1
Inno4Future

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 in 3 days
(5 Reviews)
3.7
panjvirsingh

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 More

$155 USD in 3 days
(13 Reviews)
3.6
YonTech

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 More

$166 USD in 3 days
(6 Reviews)
3.6
$100 USD in 3 days
(3 Reviews)
2.8
trutony

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 More

$400 USD in 7 days
(2 Reviews)
2.8
praita

Hi, there! I am a software developer and I think I am the just guy who you are looking for. I have a rich experience in software development. I am sure this job is suitable for me. Best regards

$222 USD in 3 days
(5 Reviews)
2.5
$55 USD in 3 days
(2 Reviews)
1.9
NienYi07

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 More

$110 USD in 3 days
(2 Reviews)
1.3
BestSkilled

Hellow, Client. Are you really looking for some1 who masters c/c++/OS/thread poll programming? If yes, we should talk.'ve 15+ years of experience. Let's build success!! Relevant Skills and Experience C Programming, C+ More

$177 USD in 3 days
(3 Reviews)
0.8
tuanthanhle

A proposal has not yet been provided

$155 USD in 3 days
(1 Review)
0.8
javascript04

HI I am Xpert D.I am senior Developer and I am Expert in C , C++ Programming, Java, Python, Software Architecture. I have completed 200+ based projects in programming with 100% client satisfaction Relevant Skills and More

$50 USD in 3 days
(0 Reviews)
0.0
ayaanbhat427

HELLO My name is Ayaan Bhat. i am professional developer and I am Expert in programming i have completed 200+ based projects in programming with 100% client satisfaction. I have working experiences of more than More

$50 USD in 3 days
(0 Reviews)
0.0
$30 USD in 1 day
(0 Reviews)
0.0