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. Definition of Operating System? Definition of Operating System: • An Operating system is a program which controls execution of application programs and acts as an interfa

What is an effector process? The effector process is a method that verifies itself.The effector process exists in particular criteria.

Question: (a) Explain the similarities and differences between two different threads running in the same process and two independent processes. When would you want to use two t

A-  In a table format, compare between Programmed I/O, Interrupt -driven I/O, and Direct Memory Access (DMA) in terms of basic idea, Advantages, disadvantages, and the operating en

Explain about deadlock prevention? In order for the occurrence of deadlock, the four conditions like mutual exclusion, hold and wait, no pre-emption and  circular wait must hap

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


Refer a program with a linked origin of 5000. Suppose the memory area allocated to it have the start address of 70000. Determine the value to be loaded in relocation register?

What are the advantages of multi threading?  Multithreading a code can have several advantages. Improve application responsiveness --Any program in which var

Q. Several CPUs provide for more than two modes of operation. What are two probable uses of these multiple modes? Answer: Although most systems merely distinguish between use