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
Utility Programs: those programs which are not the essential part of operating system. But they provide different utilities / features to the users e.g. MS-DOS : Fdisk, FORMAT, AT

Q. What is the occupation of the object manager? Answer: Substance present a generic set of kernel mode interfaces to user mode programs. Objects are influenced by the execut

Allocators can also be used to avoid problems with unsafe languages. C and C++ are pervasive, with huge amounts of existing code. They are also memory-unsafe languages, in that the

A friend has promised to log in at a particular time. However, he needs to be contacted as soon as he logs in. The shell script checks after every minute whether he has logged in o

What are the various layers of a file system? The file system is composed of many dissimilar levels. Each level in the design uses the feature of the lower levels to make new f

What are the steps followed in testing? i. Unit testing - The individual components are tested in this type of testing. ii. Module testing - Related collection of independen

What are kernels and what do kernels do? The kernel is a program that comprises the central core of a computer operating   system. It has entire control over everything that

Q. How does DMA raise system concurrency? How does it make difficult hardware design? Answer: DMA increases system concurrency by allowing the CPU to perform tasks while the


What are the most common schemes for defining the logical structure of a directory? The most common schemes for explaining the logical structure of a directory Single-L