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

Define lru page replacement policy, Define ‘LRU’ page replacement policy ...

Define ‘LRU’ page replacement policy LRU is Least Recently Used page replacement policy.

What are the two types of fragmentations, Questiion 1 Use Priority Sche...

Questiion 1 Use Priority Scheduling Algorithm to schedule the following processes        Process                 Burst Time             Priority/Time            P1

Declare some applications of open source systems, Declare some Applications...

Declare some Applications of Open Source Systems • Finance • Educational • Data Storage and Management • ERP (Enterprise Resource Planning) •File Sharing & FTP

Linux, shell script that accepts two directory names as arguments and delet...

shell script that accepts two directory names as arguments and delete those file in the second directory that are identical to the file in the first

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

i need to complete project on lan architceture RAIDs etc

Define a program that is in execution is known as, Define a program in exec...

Define a program in execution is known as A program in execution is known as a process

Nested Macro calls, . Nested Macro calls are expanded using the

. Nested Macro calls are expanded using the

List three ways of allocating storage, List three ways of allocating storag...

List three ways of allocating storage, and give advantages of each. a. Contiguous allocation. Fastest, if no changes are to be made. Also simplest for random access files. b

Explain peterson''s solution for the critical section problem, Explain the ...

Explain the Peterson's solution for the critical section problem? In Peterson's solution two variables a) flag and b) turn are used as shared variables. If the both shared vari

Multiprogramming, what are the main advantages of multiprogramming

what are the main advantages of multiprogramming

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