OS Deadlock Resources
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.
- Request the resource
- Use the resource
- Release the 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.
- Preemptable Resources
- Nonpreemptable Resources
Let's describe briefly about these two types of 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.
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 »
Like/Share Us on Facebook 😋