Explain about deadlock prevention, Operating System

Assignment Help:

Explain about deadlock prevention?

In order for the occurrence of deadlock, the four conditions like mutual exclusion, hold and wait, no pre-emption and  circular wait must happen. By ensuring that one of these conditions cannot hold, we can stop the occurrence of deadlock.

Mutual exclusion

It must hold for non-sharable resources. For example a printer cannot be simultaneously shared by several processes. Sharable resources do not need mutually exclusive access, and therefore cannot be include in deadlock. Read-only files are a good example of a sharable resource.

Hold and wait

To ensure that hold and wait condition never happens in the system, we must guarantee that, whenever a process requests a resource, it does not hold any other resources. The protocols used are

1. Every process is to be request and be allocated all its resources before it begins execution.

2. Permits a process to request some resources only when the process has none (no other resources).

 


Related Discussions:- Explain about deadlock prevention

Explain the architecting for threads, Explain the Architecting For Threads ...

Explain the Architecting For Threads When available, threads are an integral part of any multitasking server application program. It is important that the operating system prov

Why is rotational optimization no longer consequently useful, UNIX systems ...

UNIX systems utilized to use disk-layout optimizations based on the rotation position of disk data however modern implementations including Linux simply optimize for sequential dat

How file record length should be chosen, How File record length should be c...

How File record length should be chosen File record length should be selected to match the data characteristics

Mention the various features that characteristics deadlock, Mention the var...

Mention the various features that characteristics the deadlock condition .  The four circumstances that give rise to deadlock condition are: 1) Mutual exclusion : As a minim

Define properties of time sharing operating system, Define properties of Ti...

Define properties of Time sharing operating system Time sharing:- T his systems uses CPU scheduling and multiprogramming to provide economical interactive use of a system. The

Synchronization, As we already know, threadsmust ensure consistency; otherw...

As we already know, threadsmust ensure consistency; otherwise, race conditions (non-deterministic results) might happen. Now consider the "too much milk problem": two people share

Write a short note about context switch, Write a short note about context s...

Write a short note about context switch. Switching the CPU to another process needs saving the state of the old process and loading the saved state for the new process. This ta

Benefits of dynamic linkage of libraries, Q. What are three benefits of dyn...

Q. What are three benefits of dynamic (shared) linkage of libraries compared to static linkage? What are two situations where static linkage is preferable? Answer: The

priority-based scheduling algorithm , Your task is to replace the round ro...

Your task is to replace the round robin CPU scheduling scheme you developed in Practical 6 with a priority-based scheduling algorithm. To simplify matters, you can maintain the ori

Explain the sleep (ms) function, Explain the Sleep (ms) Function  This ...

Explain the Sleep (ms) Function  This call places the current thread in a suspended state for the number of milliseconds passed as the parameter (ms). After that Windows NT wil

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