1. Engineering
  2. Computer Science
  3. 1 determine if a deadlock exists by drawing resource allocation...

Question: 1 determine if a deadlock exists by drawing resource allocation...

Question details

1. Determine if a deadlock exists by drawing resource allocation graph and determine if there is a cycle. Remember a cycle does not guarantee a deadlock but it does indicate a strong possibility.(Note: P is short for processes, R is short for resources)

a)

P = {P1, P2}
R = {R1, R2, R3}
P1 holds R1 and R3, P2 holds R2
P2 wants/requests R1
Each resource only has 1 instance

b)

P = {P1, P2, P3}
R = {R1, R2, R3}
P1 holds R2, P2 holds R1, P3 holds R3
P1 wants/requests R1, P2 wants/requests R3
Each resource only has 1 instance

c)

P = {P1, P2, P3, P4}
R = {R1, R2}
P1 holds R2, P2 holds R1, P3 holds R1
P1 wants/requests R1
R1 and R2 both have two instances

**************************************************

2. Perform Round Robin scheduling on the following process schedule (assume each process comes in right after another) and state the average wait time

Process   Burst Time
P1   24
P2   3
P3   3
P4   5

**************************************************

3. Perform Priority scheduling on the following process schedule (assume each process comes in right after another) and state the average wait time

Process   Burst Time   Priority
P1   8   1
P2   5   5
P3   3   4
P4   1   3
P5   2   2


**************************************************

4. Perform FCFS scheduling on the following process schedule (assume each process comes in right after another) and state the average wait time

Process   Burst Time
P1   1
P2   1
P3   1
P4   5


**************************************************
5. Perform SJFS nonpreemptive and preemptive scheduling on the following process schedule (assume each process comes in right after another) and state the average wait time

Process   Burst Time   Arrival
P1   5   0
P2   8   1
P3   6   2
P4   1   3

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution