Professional Documents
Culture Documents
Fall 2022 - CS604 - 2 (bc200408912)
Fall 2022 - CS604 - 2 (bc200408912)
Assignment # 02 23/01/2023
OBJECTIVE
The objective of this assignment is to provide hands-on experience of:
Resource Allocation Graph
Deadlock Avoidance
Paging, Logical and Physical Address
Question No. 1 10
Marks
Draw the Resource Allocation Graph from given process states information of a system and
identify the processes if any cycle is created in the graph.
Resource Instances
One instance of resource type R1
Two instances of resource type R2
One instance of resource type R3
Question No. 02 05
Marks
Suppose a system has resource type A with 18 instances and 5 processes and the current
system state is shown in the following table.
Calculate the Need of each resource by using the need formula and draw the Need Matrix.
Solution :
The need matrix is a table that represents the maximum resources that a process can
still request to complete its execution, given the current system state. It is calculated by
subtracting the allocated resources from the maximum resources required by each
process.
Given the current system state, the need matrix for each process can be
calculated as follows:
Question No. 03 05
Marks
Assume a Logical Address Space of 64 pages of 1024 words, each mapped into a physical
memory of 32 frames. How you can calculate the various parameters related to paging.