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

Why is rotational optimization no longer consequently useful, UNIX systems ...

UNIX systems utilized to use disk-layout optimizations based on the rotation position of disk data however modern implementations including Linux simply optimize for sequential dat

Android application development using java, This is a group project as desc...

This is a group project as described in the 'AssignmentDescription.pdf' file. I am doing a sub project which is "sub project Mobile application. Android or Apple based. Turn based

Why page sizes always powers of 2, Q. Why page sizes always powers of 2? ...

Q. Why page sizes always powers of 2? Answer: Recall that paging is executed by breaking up an address into a page and offset number. It is most competent to break the address

Define properties of real time operating system, Define properties of Real ...

Define properties of Real time operating system Real time :- Often used in a dedicated application, this system reads information from sensors and must respond within a fixed a

BARBER SHOP PROBLEM, a) The barber shop has one barber, one barber chair, a...

a) The barber shop has one barber, one barber chair, and n chairs for waiting customers, to sit on. If there are no customers present, the barber sits down in the barber chair and

Explain message passing system, Message passing system:- The function o...

Message passing system:- The function of message system is to permit processes to communicate with one another without the requirement to resort (option) to shared data. Commun

Malloc, I need help implementing malloc

I need help implementing malloc

Selection of a disk-scheduling algorithm, Q. How would utilize of a RAM di...

Q. How would utilize of a RAM disk affect your selection of a disk-scheduling algorithm? What factors would you require to consider? Do the similar considerations apply to hard-di

Operation research, scattered resposibi;ity and authority -necessity of ope...

scattered resposibi;ity and authority -necessity of operation research

What are turnaround time and response time, What are turnaround time and re...

What are turnaround time and response time? Turnaround time is the interval among the submission of a job and its completion. Response time is the interval among submission

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