Deadlock, Operating System

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);

}

 

Posted Date: 4/2/2013 4:02:38 AM | Location : United States







Related Discussions:- Deadlock, Assignment Help, Ask Question on Deadlock, Get Answer, Expert's Help, Deadlock Discussions

Write discussion on Deadlock
Your posts are moderated
Related Questions
How can the index blocks be implemented in the indexed allocation scheme? The index block can be implemented as follows a. Multilevel scheme b. Linked scheme c. Combin

What is internal fragmentation? Consider holes of 20k assume the process requests 18 bites. If we allocate accurately the request block, we are left with a hole of 2k. The over

In a  p system each part (RAM, ROM, I/O) has a unique set of numbers. The allocation of these numbers is usually stated in the form of a memory map. This is a plot of data bus agai

What are the various file operations? The six basic file operations are Creating a file Reading a file Writing a file Repositioning within a file Tr

Q. Why High level languages need Compiler? High level languages - illustrations are COBOL, FORTRAN, PL/I andALGOL - are processed by interpreters andcompilers. A compilers is a

Question 1: "Three entities must be accountable and responsible for accident prevention." (a) List and explain these three entities. (b) Discuss the role of workers in ma

Explain the Real Time Operating System A real-time operating system comprises definite, fixed time constraints. Processing should be done in the defined constraints, or the sys

What is independent process? A process is independent it cannot influence or be affected by the other processes implementing in the system. Any process does not share data with

how to move the system app to usb storage

FIXED PARTITIONING In a fixed partitioning, the operating system inhabiting some fixed portion of main memory is available for use of multiple processes -Using fixed partit