What is Resources ?

The resources are partitioned into several types, each of which consists of some number of identical instances. space, CPU cycles, files, and I/O devices (such as printers and tape drives) are examples of resource types.
There are two types of resources, namely pre-emptable and non-preemptable resources.
• Pre emptable: These resources can be taken away from the process with no ill effects, for example, CPU, memory.
• Non-preemptable: These resource can be taken away from the process (without causing any ill effect).For example, CD ,USB drive,Plotter,printer,etc. We cannot give such resources to other processes in the middle of their jobe.

UNDER THE NORMAL MODE OF OPERATION, A PROCESS MAY UTILIZE A RESOURCE IN ONLY THE FOLLOWING SEQUENCE:

o Request: If the request cannot be granted immediately (for example, the resource is being used by another process), then the requesting process must wait until it can acquire the resource.
o Use: The process can operate on the resource (for example, if the resource is a printer, the process can print on the printer).
o Release: The process releases the resource.
• The request and release of resources are system calls
• A set of processes is in a deadlock state when every process in the set is waiting for an event that can be caused only by another process in the set.
• The events with which we are mainly concerned here are resource acquisition and release. The resources may be either physical resources (for example, printers, tape drives, memory space, and CPU cycles) or logical resources (for example, files, semaphores, and monitors).
• other types of events may result in deadlocks (for example, the IPC facilities).

Posted on by