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

Kernel mode and user mode function, Q. How does the distinction among kerne...

Q. How does the distinction among kernel mode and user mode function as a rudimentary form of protection (security) system? Answer: The distinction among kernel mode and user m

Explain the novell netware, Explain the Novell NetWare     NetWare does...

Explain the Novell NetWare     NetWare doesn't really have the concept of processes in the architecture, as  the most closely associated element in the NetWare  environment to

Define virtual memory, Define Virtual memory Virtual memory is employe...

Define Virtual memory Virtual memory is employed in all major commercial operating systems

Why interrupt can be used, Why interrupt can be used? The majority of t...

Why interrupt can be used? The majority of the different parts of the PC need to send information to and from the processor and they expect to be able to get the processor's at

Producer-consumer, The general idea of a producer-consumer architecture is ...

The general idea of a producer-consumer architecture is related to building a pipeline of threads, similar to the web spider from Project 2. Each step of the processing will now be

Define maintaining data on a per client basis, Define Maintaining Data on a...

Define Maintaining Data on a Per Client Basis Perhaps the most dramatic syntactical programming change for the application developer of client – server applications is maintain

Deadlock, Suppose we have 3 processes running at the same time as shown in ...

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 r

Explain the scheduleworktodo function used in netware, Explain the Schedule...

Explain the ScheduleWorkToDo Function used in Netware ScheduleWorkToDo(MyThread Function, arg, workToDo) The ScheduleWorkToDo ( ) function is specific to NetWare 4.0. This c

What are the differences between process and thread, What are the differenc...

What are the differences between process and thread? The fundamental difference between a process and a thread is that a process has an entire copy of the program to itself and

Define dynamic linking, Define dynamic linking. Dynamic linking is same...

Define dynamic linking. Dynamic linking is same to dynamic loading, rather that loading being postponed unless execution time, linking is postponed. This feature is usually use

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