Deadlock prevention, Operating System

Assignment Help:

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.


Related Discussions:- Deadlock prevention

Explain formal language grammar, Explain Formal Language Grammar A form...

Explain Formal Language Grammar A formal language grammar is a set of formation rules which explain which strings formed from the alphabet of a formal language are syntacticall

Explain general graph directory structure, General Graph Directory A s...

General Graph Directory A serious trouble with using an acyclic graph structure is making sure that there are no cycles. When links are further added to an existing tree struc

Multiprogramming, explain how response time are reduced by allowing time sh...

explain how response time are reduced by allowing time sharing on top of multiprogramming

Why is rotational latency is not taken in disk scheduling, Why is rotationa...

Why is rotational latency usually not considered in disk scheduling? How would you modify SSTF, SCAN, and C-SCAN to include latency optimization? Most disks do not export their

When page fault frequency in an operating system is reduced, When the Page ...

When the Page fault frequency in an operating system is reduced Locality of reference is appropriate to the process

Long term scheduler, Long term scheduler calculates which processes are a...

Long term scheduler calculates which processes are admitted to the machine for processing. It accepts the degree of multiprogramming. Once accepted, a job converts a process.

Define the properties of interactive operating system, Define the propertie...

Define the properties of Interactive operating system Interactive:- This system is composed of many short transactions where the results of the next transaction may be unpred

Define local procedure call, Q. What kinds of services does the process man...

Q. What kinds of services does the process manager provide? Define local procedure call? Answer: The process manager offers services for creating and deleting and using proce

Explain single level directory structure, Single level directory: This ...

Single level directory: This is the easiest directory structure. All the files are controlled in the same directory, which is simple to support and understand. Few of the li

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