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

Factors involved in choosing the host operating system, 1. How is reliabili...

1. How is reliability enhanced with the microkernel approach to system design?  2. In a virtual machine design where guest operating systems are independent virtual machines sup

Explain the sleep (ms) function, Explain the Sleep (ms) Function  This ...

Explain the Sleep (ms) Function  This call places the current thread in a suspended state for the number of milliseconds passed as the parameter (ms). After that Windows NT wil

What are tree-structured directories, What are Tree-structured directories ...

What are Tree-structured directories We can generalize the directory structure to a tree of arbitrary height. This permits the user to create their own sub directories and to c

What is the hardware support required to implement paging, What is the hard...

What is the hardware support required to implement paging? Each operating system has its own techniques for storing page tables. The majority allocates a page table for each pr

Principles of informtiona tecnologu, i need to complete project on lan arch...

i need to complete project on lan architceture RAIDs etc

Benefits of dynamic linkage of libraries, Q. What are three benefits of dyn...

Q. What are three benefits of dynamic (shared) linkage of libraries compared to static linkage? What are two situations where static linkage is preferable? Answer: The

Suggest a scheme for implementing this policy, Q. Consider a calculating e...

Q. Consider a calculating environment where a process is given the privilege of accessing object only n times. Suggest a scheme for implementing this policy. Answer: Add an i

Name the evolutionary process models, Normal 0 false false ...

Normal 0 false false false EN-IN X-NONE X-NONE MicrosoftInternetExplorer4

Explain wait for graph, Explain Wait for Graph a. Use a resource alloca...

Explain Wait for Graph a. Use a resource allocation graph to derive a wait-for graph.  b. Wait-for graph acquired by making an edge from p 1 to p 2 iff p 1 is waiting for

Removing system dependencies, Removing System Dependencies Because port...

Removing System Dependencies Because portions of the client - server application program may execute on different machines, it is very important for the developer to remove the

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