Ditutup

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.

Kemahiran: Pengaturcaraan C, Pengaturcaraan C++, Java, Python, Kejuruteraan Perisian

Lihat lagi: 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

Tentang Majikan:
( 0 ulasan ) United States

ID Projek: #15687795

16 pekerja bebas membida secara purata $151 untuk pekerjaan ini

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 Lagi

$144 USD dalam 3 hari
(817 Ulasan)
9.8
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 Lagi

$150 USD dalam 3 hari
(154 Ulasan)
7.1
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 Lagi

$120 USD dalam 3 hari
(42 Ulasan)
6.1
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 dalam 2 hari
(74 Ulasan)
6.1
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 Lagi

$155 USD dalam 3 hari
(64 Ulasan)
5.6
$30 USD dalam sehari
(7 Ulasan)
5.1
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 Lagi

$220 USD dalam 3 hari
(27 Ulasan)
5.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 dalam 3 hari
(12 Ulasan)
4.4
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 Lagi

$155 USD dalam 3 hari
(17 Ulasan)
4.2
tuanthanhle

A proposal has not yet been provided

$155 USD dalam 3 hari
(11 Ulasan)
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 Lagi

$166 USD dalam 3 hari
(8 Ulasan)
3.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 Lagi

$400 USD dalam 7 hari
(2 Ulasan)
2.8
$200 USD dalam 3 hari
(1 Ulasan)
2.8
$55 USD dalam 3 hari
(2 Ulasan)
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 Lagi

$110 USD dalam 3 hari
(2 Ulasan)
1.3
SayanProgrammer

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 Lagi

$100 USD dalam 3 hari
(0 Ulasan)
0.0