Deadlock prevention, Operating System

While it is hard to resolve a deadlock which has been detected, fortunately it is fairly easy to prevent deadlocks from ever happening. The key is that the conditions above for deadlock are all necessary. We just have to ensure that at least one condition cannot be true. We de?nitely cannot get rid of the problem of ?nite resources; that is something we have to live with. And in many cases it can be dif?cult to get rid of the conditions of hold-and-wait and lack of preemption.

But we can eliminate circular waiting. One standard way of doing this is to have a so-called canonical ordering of the locks. This means that the programmer must always acquire the locks in a speci?ed order, such as ?rst lock1, then lock2, then lock3, etc. By doing so, we will ensure a system whose thread/resource graph is cycle-free, and therefore the system will be deadlock-free.

Posted Date: 3/12/2013 5:32:31 AM | Location : United States







Related Discussions:- Deadlock prevention, Assignment Help, Ask Question on Deadlock prevention, Get Answer, Expert's Help, Deadlock prevention Discussions

Write discussion on Deadlock prevention
Your posts are moderated
Related Questions
Q. List three instances of deadlocks that aren't related to a computer system environment. Answer: Two cars passage a single-lane bridge from opposite directions.

Use and overview? Pure and impure interpreter?


Additional Reference bits algorithm Here we keep an 8-bit byte for every page in memory. At standard intervals the reference bit is shifted by the OS. If a shift register conta

What is busy waiting? The repeated implementation of a loop of code while waiting for an event to happen is known as busy-waiting. The CPU is not engaged in any actual producti

Q.  When virtual memory is executed in a computing system there are convinced costs associated with the technique and certain benefits. List the costs as well as the benefits. Is i

What are the objectives of operating system? Objectives of OS 1.      Convenience: An OS makes a computer more suitable to use. 2.      Efficiency : An OS allows t

Determine a scheduling policy that is most suitable for a time-shared operating system   Round-Robin is a scheduling policy that is most suitable for a time-shared operating s

What are the different files attributes? File name:-it's the name of the file. It's the name with which the user identifies. Identifiers:-it's created when a file is created

Explain the different sections of a process.     Entry section     Critical section     Exit section     Remainder section Consider a system inclusive of n processe