1

Resource Allocation Graph in Operating System

 1 year ago
source link: https://www.geeksforgeeks.org/videos/resource-allocation-graph-in-operating-system/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
  • 260 Views
  • 24/11/2022

In this video, we will understand what is a Resource Allocation Graph (RAG) in Operating System.

What is Resource Allocation Graph (RAG)?

A Resource Allocation Graph is a diagram that tells about the state of the system in terms of processes and resources. The diagrammatic representation of a RAG helps in the easy identification of a deadlock as compared to a tabular representation. However, if the number of processes and their corresponding processes is large in number, tabular representation is better.

Each RAG contains vertices and edges such that there are 2 types of vertices and two types of edges that can be present.

  • Process Vertex: Every process is denoted by a vertex in the Resource Allocation Graph. Process vertices are generally denoted by a circle.
  • Resource Vertex: Every resource is represented as a vertex in the Resource Allocation Graph. They are two types:
    • Single-instance resource: It is depicted using a single dot inside a box, where the dot indicates the single available instance of the resource.
    • Multi-instance resource: It is represented by multiple dots inside the box. The number of dots equals the number of instances.

Types of edges used in resource allocation graph:

  • Assign Edge: This edge is used when a resource has already been assigned to a process. The arrowhead of the assigned edge points to the process to which the resource has been allocated.
  • Request Edge: A request edge indicates that the resource has been requested by a process and this request might be fulfilled in the future. The arrowhead of the request edge points to the resource which has been requested by the process.

Apart from this there are various states too which we have discussed in the video.

Resource Allocation Graph in OS:
https://www.geeksforgeeks.org/resource-allocation-graph-rag-in-operating-system/


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK