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

Describe swapping technique in unix systems, Describe swapping technique in...

Describe swapping technique in UNIX systems. Swapping is used to control memory contention among processes. If there is excessively much memory contention, processes are swappe

What is symmetric multiprocessing, Symmetric multiprocessing To get ma...

Symmetric multiprocessing To get maximum reliability and efficiency a mode of function called as symmetric multiprocessing is used. In essence, with SMP any program or threads

Quick, why we say " OS is a resource allocator" and “OS is a control progr...

why we say " OS is a resource allocator" and “OS is a control program"?

integrator circuit, Referring to Figure below, discuss how you would alter...

Referring to Figure below, discuss how you would alter the circuit to obtain: 1. a straightforward amplifier with gain 1, 2. a straightforward amplifier with gain 10, 3. a

FUNDAMENTAL OF OS, WHAT IS OPERATING SYSTEM ?ENLIST AND EXPLAIN BASIC SERVI...

WHAT IS OPERATING SYSTEM ?ENLIST AND EXPLAIN BASIC SERVICES PROVIDE BY OS

Kernel mode and user mode function, Q. How does the distinction among kerne...

Q. How does the distinction among kernel mode and user mode function as a rudimentary form of protection (security) system? Answer: The distinction among kernel mode and user m

Define input - output operations, Q. Define Input - Output operations? ...

Q. Define Input - Output operations? Serial lines, Disks, tapes and other devices should be communicated with at a very low level. The user require only specify the device and

Fcfs scheduling algorithm, Q. Presume that the following processes arrive f...

Q. Presume that the following processes arrive for execution at the times indicated. Every process will run the listed amount of time. In responding the questions use non pre-empti

Unix , A friend has promised to log in at a particular time. However, he ne...

A friend has promised to log in at a particular time. However, he needs to be contacted as soon as he logs in. The shell script checks after every minute whether he has logged in o

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