Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Total system resources ABCD 6476 ABCD 1 221 0033 1120 P3 Processes (maximum reso

ID: 3595142 • Letter: T

Question

Total system resources ABCD 6476 ABCD 1 221 0033 1120 P3 Processes (maximum resources) PI P2 ABCD 2332 0133 P3 2150 Answer these questions: a. Determine the "remaining needs" for each job in each system Processes (Remaining needs) P1 P2 P3 b. Determine whether each of the systems is safe or unsafe. if the system is in a safe state, list the sequence of requests and releases that will make it possible for all processes to run to completion. If the system is in an unsafe state, show how it's possible for deadlock to occur. c.

Explanation / Answer

Process

Allocation

Max

Available

Need

A B C D

A B C D

A B C D

A B C D

P1

1 2 2 1

2 3 3 2

6 4 7 6

1 1 1 1

P2

0 0 3 3

0 1 3 3

0 1 0 0

P3

1 1 2 0

2 1 5 0

1 0 3 0

* Need[i] = Max[i] - Allocation[i]
Initial work = Available = 6 4 7 6 (Resources available)
Now, Process P1 --> Need (1 1 1 1) <= Available (6 4 7 6) --> (True)
We know, Available --> work = work + allocation[Pi] = 6 4 10 9
Process P1 finishes with resources available.
Now, Process P2 --> Need (0 1 0 0) <= Available (6 4 10 9) --> (True)
So, Available --> work = work + allocation[Pi] = 7 5 12 9
Process P2 finishes.
Now, Process P3 --> Need (1 0 3 0) <= Available (7 5 12 9) --> (True)
We have enough resouces for all process to complete.

System is in Safe sequence.
safe sequence --> <P1,P2,P3>

Process

Allocation

Max

Available

Need

A B C D

A B C D

A B C D

A B C D

P1

1 2 2 1

2 3 3 2

6 4 7 6

1 1 1 1

P2

0 0 3 3

0 1 3 3

0 1 0 0

P3

1 1 2 0

2 1 5 0

1 0 3 0

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote