Featured Post

Different types of communication devices

Different types of communication devices  NIC & Bridge Network interface card  Network interface card is a communication d...

Monday, September 2, 2019

Resources and its types in operating system + resource allocation graph

Resources and its types in operating system + resource allocation graph 





Resources and object that is used by a process. It can be a piece of hardware such as

1. Tape drive
2. Diskdrive
3. Printer
4. File
5. Record in a file.
6. Sahred variable
7. Critical section

Computer typically has many different resources, in some cases there may be many instances of a resource of a given type. A process needing one of these resources can use any other one of them. In other cases there may be only one instance of a resource.

Types of resources

1. Preemtible Resources
2. Non Preemptible Resources

1. Preemptive Resources

These resources is one that can be allocated to a given process for a period of time. Then it can be allocated to another process. Process can be allocated to the first process without any negative effect. Example of preemtible resources include memory, buffer, cPU and array processor.


2. Non Preembtible Resources

Cannot be taken from one process and given to another without side effects one example is a printer. A printer cannot we take away from one process and given to another process in the middle of a print job. That lock usually involve non primitive resources.


Resource allocation graph

Resource allocation graph is used to describe deadlock graphically. Madras has two different types of nodes i.e. Process nodes and resource nodes. Process represented by circles and resources are the presented by rectangle. Foreach instance of an source there is a.in the resource nodes rectangle. For example if there are two identical printer the printer resources will have to dot. H among nodes represent resource allocation and request. If edge goes from resource to process node it indicates that the process has acquired the resources and if edge goes from process node to resource node it indicates that the process has requested the resources.

No comments:

Post a Comment