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
what is instant messaging used for

Linked list allocation using index The blocks don't have a fixed size. Pointers are utilized to point to the next block in a file. The pointers are set aside as a separate tabl

Linked list allocation: At this time the blocks are stored using linked lists. The block size require not be the same. Thus internal fragmentation is avoided. Consider

Define the Server Communications Module or SCM The Server Communications Module (SCM) performs many necessary functions. The SCM responsible for establishing, maintaining, and

Determine the syntax of the assembler directive EQU The following is syntax of the assembler directive EQU: EQU

A UNIX file system has 1-KB blocks and 4-byte disk addresses. What is the maximum file size if i-nodes contains 10 direct entries, and one single, double, and triple indirect entry

Q. Explain about Time Sharing Systems? Time Sharing Systems Multi-programmed batched systems provide an environment where various system resources (for illustration CP

linked allocation using i node

What are the phases of background processing? Phases are:- Job Scheduling. Job Processing. Job Overview.

Define a layer that is not of an IO management module  MCS that is Management Control System is not of an IO management module