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
EXAMPLE FOR SEGMENTATION Consider an instance as given in the table and we have five segments numbered from 0 through 4 the segment is stock in the physical memory as shown. Th


Question 1 What is a file? Write down the operations on files Question 2 What do you mean virtual machine? Write down the application of virtual machine Question 3 What

Q. Palm OS provides no signifies of concurrent processing. Discuss three major complications that concurrent processing adds to an operating system. Answer: a. A meth

WHAT IS OPERATING SYSTEM ?ENLIST AND EXPLAIN BASIC SERVICES PROVIDE BY OS

Q. What merit is there in having different time-quantum sizes on different levels of a multilevel queuing system? Answer: Processes that require more frequent servicing for ins

Sharing segments between processes without requiring the same segment number is possible in a dynamically linked segmentation system. a. Define a system that permits sta


Q. What protection problems may occur if a shared stack is used for parameter passing? Answer: The contents of the stack could be conciliation by other process(es) sharing th