0% found this document useful (0 votes)
77 views2 pages

Assignment3 13

This document provides an assignment on operating systems for a course. It includes a snapshot of a system with processes and resources. Students are asked to use Banker's algorithm to: 1) Calculate the needs matrix for each process and resource. 2) Determine if the system is in a safe state and show a safe order of processes if so. 3) Determine if a request for an additional instance of resource RA by Process P0 can be granted safely.

Uploaded by

beter
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
77 views2 pages

Assignment3 13

This document provides an assignment on operating systems for a course. It includes a snapshot of a system with processes and resources. Students are asked to use Banker's algorithm to: 1) Calculate the needs matrix for each process and resource. 2) Determine if the system is in a safe state and show a safe order of processes if so. 3) Determine if a request for an additional instance of resource RA by Process P0 can be granted safely.

Uploaded by

beter
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

Al Ain University of science and technology

College of engineering and Information Technology

ASSIGNMENT 3
Course Number: 0101306
Section(s): 61
Date: 24-2-2014

Course Title: Operating System


Instructor: Dr. Zina Houhamdi
Due date: 3-3-2014

QUESTIONS
Consider the following snapshot of a system (P=Process, R=Resource):
RA
8

P0
P1
P2
P3
P4

P0
P1
P2
P3
P4

Maximum Demand
RA
RB
RC
3
2
1
0
2
5
5
1
0
1
5
3
3
0
3
Current Allocation
RA
RB
RC
1
0
1
0
1
2
4
0
0
1
2
1
1
0
3

Available
RB
RC
5
9

RD
7

RD
4
2
5
0
3
RD
1
1
3
0
0

Answer the following questions using bankers algorithm:


a)

Calculate the Needs matrix:


RA

Needs
RB

RC

RD

P0
P1
P2
P3
P4
b)

Is the system in a safe state? If so, show a safe order in which the processes can run.

c) Can a request of one instance of RA by Process P0 be granted safely according to Bankers


algorithm?

GOOD LUCK

You might also like