codescracker


operating system os

OS Deadlock Resources



« Previous Tutorial Next Tutorial »


Deadlocks can occur whenever processes have been granted exclusive access to computer devices, files, etc.

A resource can be a computer hardware device or a piece of information.

Generally, a computer have many resources that can be acquired.

You can also say that a resource is anything that can be used by only a single process at any instant of time.

Here is the sequence of events that are required to use a resource.

In case, if a resource is not available when it is requested, the requesting process is forced to wait.

In some OS, the process is automatically blocked whenever a resource request fails and awakened when it becomes available. And in other OS, the resource request fails with an error code and it is up to the calling process to wait a little while and then try again.

There are the following types of resources.

Let's describe briefly about these two types of resources.

Preemptable Resources

A preemptable resource is the one that can be taken away from the process owning it with no ill effects.

An important and common example of preemptable resource is memory.

Nonpreemptable Resources

Without causing the computation to fail, a nonpreemptable resource is the one that can be taken away from its current owner.


« Previous Tutorial Next Tutorial »




Tools
Calculator

Quick Links
Signup - Login - Give Online Test