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

Contiguous-memory allocation, Compare contiguous-memory allocation with pur...

Compare contiguous-memory allocation with pure paging in the following aspects: 1. In support of dynamic memory allocation: most systems allow programs to allocate more memory t

What is meant by the phrase thread-safe, The term thread-safe in computer p...

The term thread-safe in computer programming describes that routine or portion of the program that may be called from multiple programming threads without uncalled for interactions

Linux os, Introduction of linux

Introduction of linux

Process destruction, Most process abstractions support processes being dest...

Most process abstractions support processes being destroyed when the program terminates, or in response to a specific kill directive. There are two common implementations, one a "p

Which are the different states of a process, Which are the different states...

Which are the different states of a process?   Different status of a process is: New: When the process is created. Running: When instructions are executed. Wait

List post-installation procedures that need to be performed, Problem: (...

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

Semaphore examples, Ok so i think i got this right by not 100% on this. wha...

Ok so i think i got this right by not 100% on this. what I want to figure out is if there are x visitors that can line up for a ride but only 1 passenger can get on the ride at a t

Any four types of operating system feature and structure, explain any four...

explain any four types of operating system feature and structure(design)

History of operating systems, Operating Systems have evolved tremendously i...

Operating Systems have evolved tremendously in the last few decades. The first approach for building Operating Systems, taken during the 40s through early 60s, was to allow only on

Operating System, my Operating System is windows trust but when the windows...

my Operating System is windows trust but when the windows start say its windows xp. help pleaes

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