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

Transportation, what are the factors influencing the choice of a mode of tr...

what are the factors influencing the choice of a mode of transportation?

Catalogue the design goals of windows xp, Q. Catalogue the design goals of ...

Q. Catalogue the design goals of Windows XP. Answer: Design goals comprise security and reliability and Windows and POSIX application compatibility with high performance and ex

What is the translation look aside buffer (tlb), Translation Look aside Buf...

Translation Look aside Buffer In a cached system, the base addresses of the last few indexed pages is maintained in registers named the TLB that adds in faster lookup. TLB has

What is the use of boot block, What is the use of boot block? For a com...

What is the use of boot block? For a computer to begin running when powered up or rebooted it requires having an initial program to run. This bootstrap program tends to be easy

How relocation bits used by relocating loader are specified, Relocation bit...

Relocation bits employed by relocating loader are specified by Relocation bits employed by relocating loader are specified by Assembler or Translator

What is the benefits os co-operating process, What is the benefits OS co-op...

What is the benefits OS co-operating process? Information sharing. Computation speeds up. Modularity. Convenience.

What is spooling, What is spooling? Spooling overlaps the I/O of single...

What is spooling? Spooling overlaps the I/O of single job with the computation of other jobs.

Question, A paper mill produces two grades of paper viz., X and Y. Because ...

A paper mill produces two grades of paper viz., X and Y. Because of raw material restrictions, it cannot produce more than 400 tons of grade X paper and 300 tons of grade Y paper i

Principles of informtiona tecnologu, i need to complete project on lan arch...

i need to complete project on lan architceture RAIDs etc

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