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
What are the various categories of software?  System software Application  software Engineering/Scientific software Embedded software  Web Applications Artificial I

Question 1: "Three entities must be accountable and responsible for accident prevention." (a) List and explain these three entities. (b) Discuss the role of workers in ma

What are the requirements to be satisfied by the critical section problem? Following are the necessities to be satisfied by the critical section problem: a)      Mutual exc

i need to complete project on lan architceture RAIDs etc

Q. Can a system detect that some of its processes are starving? If you answer "yes," explain how it can. If you answer "no," explain how the system can deal with the starvation pro

UNIX Shell and History feature. 1.Creating a child process. 2.Creating a history feature. Its exactly "programming project 1 - Unix Shell and History Feature (p.157-159)" in the Si

Many-to-One Model (Green Threads) Implementations of the many-to-one model a lot of user threads to one kernel thread permit the application to create any number of threads tha

Define the Executor (Worker Thread)  The responsibility of the Executor (or Worker Threads) is to execute instructions on behalf of a client-server connection. The Executor mus

Question: (a) The actual use and scope groups depend on the mode in which a domain is running. There are two domain modes in which you can run a Windows 2000 domain. List and d

how to move the system app to usb storage