Resource allocation Graph | Example | OS | Lec-67| Bhanu Priya

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi students coming to the next topic that is a resource allocation graph so what is this resource allocation graph resource allocation means we are allocating the resource to each process so if you are allocating the resource to process so how it is going to be arranged in the graph model so now let us see so each process actually utilizes a resources each process utilizes a resource as request first the process utilize the resources with the help of request first it is requesting the resources using the resources and releasing the resources so that is a basic condition that whatever the process that is digna that it is a CPU process or the memory process or whatever the cache or printer whatever the you are taking the process so what that process that the sequence of operations will do first it request after that it uses that request and then completion of the work it releases the resources that process will releases the resources now let us see this resource allocation graph so a resource allocation graph consists of a set of vertices let us take a set of what is this that is the V and set of edges set of edges e a set of vertices V and a set of edges E and V is partitioned V is partition into two types so one so this vertices the weak the vertices V is divided partition into two types one as P and another as R so P is nothing but a process it consists of set of process p1 p2 up to PN the set consisting I'm writing the definition for this resource allocation graph so that V partition into two types that vertices that is a P the set of the set consisting of all the process all the processes in the system and are consists of set R 1 R 2 up to R n so the set consisting of all resources so here P is all processed and R is all resources type in in the system so a resource allocation graph consists of a set of vertices V and set of edges E and V is again partitioned into two types P and R P is a set of process in the system R is a set of resources in the system and the request edge you call it as request edge it is a directed edge you call it as P I is requesting for Rjay resources if P I is arrow like this if rj that means P I is requesting the process requesting the RJ resource that is a requesting edge so this you call it as a requesting edge assignment edge assignment H directed graph that is a RJ is assigned to P I process always the resources is assigned to process and the process is requesting the resources so whenever the process requesting the resources if that resources is free then these resources will assign to that process so this you call it as a request H and this you call it as an assignment H now let us see the example for this resource allocated graph example let us take our one resource r1 resource consists of a single instance so the dot indicates instance that is present in that resource a single instant and here are 3 RT r 3 is having single instance and r2 sorry so R 2 is having let me write our two off-site r2 is having two instance ok and R 4 R 4 is having three instance means it is having the resources that it can shape 2 3 process to to process only one process the resource can share to only to one process only one instant is there and here the processes are there let us take three process p1 p2 and p3 so the processor always represented in a circle way and the resources are in square shape so in the torte indicates the instances that are present in the resources so this p1 is requesting r1 but r1 is assigned to p2 p2 is requesting r3 but R 3 is assigned assigned to p3 and one of the instance in r2 is assigned to p1 and another resource in our to another instance in r2 is assigned to p2 so this is the representation of our resource this you call it as a resource allocation graph and this is the resources and these are the process resource will be allocated to each process in a graphical way so this is a graph representation so this is us here it forms once a complete cycle this is a close of cycle and this is an open cycle so this is not completely connected graph so this is connected graph ok so this is how you're representing request H and this is a request edge and this is the assignment edge so p1 is requesting for r1 and assigned r2 p p2 is requesting for r3 and assign r2 and r1 so this is a resource allocation graph so in the next video I'll explain about the resource allocation with the Begg log and with no deadlock condition thank you
Info
Channel: Education 4u
Views: 70,381
Rating: 4.8207426 out of 5
Keywords: resource allocation graph in operating system, resource allocation graph in os, resource allocation graph algorithm in operating system, resource allocation graph algorithm, resource allocation graph algorithm in os
Id: 0rs57wImGHk
Channel Id: undefined
Length: 7min 26sec (446 seconds)
Published: Tue Jun 05 2018
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.