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 the architecting for processes, Explain the Architecting For Proces...

Explain the Architecting For Processes Processes are very important to the server application developer, as they may be used to increase responsiveness, deduction time, and tur

Parent process: why not finishing and how to make finish, #include #inclu...

#include #include #include #include #include int main(void) { int pchan[2], pid, rval, cvar; char buf[20]; if (pipe(pchan) == -1){

Explainoptimal page replacement in detail, Optimal page replacement An...

Optimal page replacement An optimal page replacement algorithm has the least page fault rate of all algorithms. The algorithm states that put back the page that will not be us

CPU sheduling, categorize the CPU scheduling algorithms and among them expl...

categorize the CPU scheduling algorithms and among them explain the non-preemptive algorithms..

Describe internal layout of the file system in windows 2000, Describe the i...

Describe the internal layout of the file system in windows 2000. The basic entity in NTFS is a volume and a volume is created by the Windows 2000 disk administrator utility and

Operation research, scattered resposibi;ity and authority -necessity of ope...

scattered resposibi;ity and authority -necessity of operation research

Explain time-sharing environment, In a multiprogramming and time-sharing en...

In a multiprogramming and time-sharing environment, several users share the system simultaneously. This situation can result in various security problems. a

What is a process control block?, What is a Process Control Block? Ever...

What is a Process Control Block? Every process in the operating system is represented by a process control block as well called a task control block. It contains several pieces

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