Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

operating system

What is a resource allocation graph in the operating system?

Kainat Asif

Resource allocation graphs represent the free resources, resources assigned to processes, and processes requesting to be assigned resources.

Components

The vertices of the resource allocation graph are used to represent:

  • Processes: Represented by a circle.
  • Resources: Represented by a rectangle. The dots in the rectangle represent the number of instances of the resource.

The edges of the resource allocation graph are used to represent:

  • From resource to process: The resource is assigned to the process.
  • From process to resource: The process requests the resource.

Example

Consider the table below, which shows the resources assigned to processes, as well as processes requesting to acquire resources:

Process

Is assigned

Is requesting

Process 1

Resource 1, 2

Resource 3

Process 2

Resource 3


Process 3

Resource 3, 4

Resource 2

The resource allocation graph of the above table will be as follows:

RELATED TAGS

operating system

CONTRIBUTOR

Kainat Asif
Copyright ©2022 Educative, Inc. All rights reserved
RELATED COURSES

View all Courses

Keep Exploring