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
The primary financial objective of corporation is usually taken to be the maximization of shareholder wealth. Discuss:- i. Ways in which the shareholder of a company can encour

Computing uses three number bases:- Binary (base 2), Octal (base 8) and Hexadecimal (base 16). Binary has been described before, although various catchphrases are used to describe

The dynamic memory allocator is a layer between the application and the OS, managing heap objects. When a program requests memory from the allocator (via malloc(), for instance), t

what branch of goverment were the federal courts are?

Problem: (a) Based on your experience in setting up Windows 2003 Server operating system, briefly describe the twelve different steps in which the installation is conducted du

Windows admin need it Project Description: We want to protect an executable on operating system level , so the process could be visible among all users while the executable r

Q. Explain some of the ways an application can use memory via the Win32 API. Answer: (1) Virtual memory offers several functions that allow an application to reserve and rele

SEGMENTATION In a memory management system that is properly a programmer views a program to be collection of program components called as segments . Every segment is a logical

How File record length should be chosen File record length should be selected to match the data characteristics

The Most comman difference are given below System calls are heavy. While a procedure call can generally be performed in a few system instructions, a system call needs the c