Deadlock, Operating System

Assignment Help:

Suppose we have 3 processes running at the same time as shown in the following table. Each resource only has one instance.

Show a possible scenario of resource allocation that results in deadlock. Using a resource allocation graph to show the scenario.

To prevent the possibility of any deadlock, you may modify the order of getting resource requests of some process. Explain how and why. You can also use a resource allocation graph to  justify your answer.

P1

P2

P3

while (1) {

      get(A);

      get(B);

      get(C);

      // critical region

      // use A, B, C

      release(A);

      release(B);

      release(C);

}

while (1) {

     get(D);

      get(E);

      get(B);

      // critical region

      // use D, E, B

      release(D);

      release(E);

      release(B);

}

While (1) {

get(C);

get(F);

get(D);

// critical region

// use C, F, D

release(C);

release(F);

release(D);

}

 


Related Discussions:- Deadlock

System call, how the system call is work?

how the system call is work?

Graph - plotting job, This exercise uses a graph-plotting program ( gnuplot...

This exercise uses a graph-plotting program ( gnuplot ) to convert tabular data into an image. This is a technique that is very widely used to visualize scientific data; with app

Basic server model, Suppose we want to program a Web server; we could easil...

Suppose we want to program a Web server; we could easily do so without using concurrency, as follows: while(true) wait connection read from socket and parse url look up url cont

Explain gui based operating system, GUI - Short for Graphical User Interfa...

GUI - Short for Graphical User Interface a GUI Operating System contains icons and graphics and is commonly navigated by using a computer mouse. Below are some instances of GUI Op

What is directory, What is Directory? The device directory or simply ca...

What is Directory? The device directory or simply called as directory records information-such as name, location, size, and type  for all files on that certain partition. The d

Linux, what is I/O management Linux

what is I/O management Linux

Transferring files from windows to unix, Transferring files from Windows to...

Transferring files from Windows to Unix Be very careful transferring files from Windows to Unix. If you do transfer a file from Windows to Unix open the file, in Unix, using vi

What are the issues in designing a network-fault tolerance, Fault tolerance...

Fault tolerance : Machine failures, Communication faults, storage device crashes, and decays of storage media must be tolerated by the system to some extent. A fault tolerant sy

What is virtual file system?, What is virtual file system? A Virtual f...

What is virtual file system? A Virtual file system switch (VFS) or Virtual file system is an abstraction layer   on top of a more concrete file system. The purpose of a VFS

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd