Operating System- CS604

Assignment # 3

Fall 2010

Marks: 20

Due Date

Your assignment must be uploaded before or on 13th Jan 2011.

Objective

The objective of this assignment is to familiarize with Deadlock Avoidance.

Instructions

Ø  Avoid Plagiarism. No marks will be given in case of cheating or copying from the internet or from other students.

Ø  Submit the assignment through your account on VULMS. No assignment will be accepted through email after the due date.

Ø  If you have any problem related to assignment, feel free to discuss it by email at

Question # 1

Using Banker’s Algorithm consider a system with six processes Pak, Iran, Qatar, Oman, UAE and Dubai and four resource types: A, B, C. and D Resource type A has 14 instances, resource type B has 10 instances, resource type C has 12 instances and D has 16 instances. Suppose that at a time T0 the following snapshot of the system has been taken:

i.  Construct Need Matrix. [5 marks]

ii.  Show execution of the Safety algorithm for the given system state to determine if the system is in a safe state Progressively construct safe sequence of the following processes. [15 marks]

Processes / Max / Allocation
A / B / C / D / A / B / C / D
Pak / 8 / 2 / 4 / 4 / 2 / 1 / 0 / 2
Iran / 11 / 4 / 5 / 3 / 3 / 2 / 2 / 3
Qatar / 2 / 4 / 4 / 3 / 1 / 2 / 2 / 2
Oman / 7 / 3 / 4 / 2 / 2 / 1 / 0 / 1
UAE / 8 / 4 / 3 / 3 / 2 / 0 / 3 / 2
Dubai / 7 / 3 / 4 / 6 / 0 / 2 / 2 / 2