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 optimal page replacement, Optimal page replacement An optimal ...

Optimal page replacement An optimal page replacement algorithm has the least page fault rate of all algorithms. The algorithm states that a 'replace the page that will not be

First-in-first-out (fifo), FIFO is named as 'named pipes'. FIFO (first-in-...

FIFO is named as 'named pipes'. FIFO (first-in-first-out) is a special file which is laid to be data transient. Once data is load from named pipe, it cannot be load again. Also, da

Multi-level page tables, Multi-level page tables are tree-like structures t...

Multi-level page tables are tree-like structures to hold page tables. As an example, consider a two- level page table, again on a 32-bit architecture with 212 = 4 kbyte pages. Now,

Define where a program generation activity aims, Define where a Program gen...

Define where a Program generation activity aims  Program generation activity aims at Automatic generation of program

Sharing memory, As we have discussed, page tables map virtual page addresse...

As we have discussed, page tables map virtual page addresses to physical page addresses. One of the advantages of using virtual addresses is that we can achieve complete separation

Definition of operating system, Q. Definition of Operating System? Defi...

Q. Definition of Operating System? Definition of Operating System: • An Operating system is a program which controls execution of application programs and acts as an interfa

Error detection, about error detection in operating system and how does it ...

about error detection in operating system and how does it take place?

Explain the various methods of file access, Operating Systems 1. Illust...

Operating Systems 1. Illustrate the Microkernel Architecture with suitable diagram. 2. When Deadlock occurs? What are the Necessary Conditions for Deadlock? 3. Describe f

General graph directory system in shell sort, we need an information about ...

we need an information about the different graph directory systems in detail by using shell sort . we also application part of directory systems in practical life. please help us i

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

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