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

A request from Process P1 arrives for (0, 4, 2, 0). Should the request be grante

ID: 3685447 • Letter: A

Question

       A request from Process P1 arrives for (0, 4, 2, 0). Should the request be granted? How would I answer this question if I do not know what is available or the allocation?

                                                                                                                     1     5     2     0

sequence    process                 allocation                               claim                                     needs                                    available

P0

0     0     1     2

0     0     1     3

0 0 0 1

1 5 6 4

P1

1     0     0     0

1     9     5     0

0 9 5 0

3 9 12 11

P2

1     3     5     3

2     3     5     6

1 0 0 3

2 8 11 7

P3

0     0     3     2

0     5     5     2

0 5 2 0

1 5 5 2

P4

0     1     1     4

0     7     5     6

0 6 4 2

2 9 12 11

A) Fill in the needs column.

B)   Is the system in a safe state ?_________Yes__________________________                   
  
Show a sequence ( if above is yes)   __P3 P0 P2 P4 P1____________

C)   A request from Process P1 arrives for (0, 4, 2, 0)
      Should the request be granted? ____________


sequence    process                 allocation                               claim                                     needs                                    available

P0

0     0     1     3

P1

1     9     5     0

P2

2     3     5     6

P3

0     5     5     2

P4

0     7     5     6

                                                        (use to calculate the answer to part C)                                               

                            

P0

0     0     1     2

0     0     1     3

0 0 0 1

1 5 6 4

P1

1     0     0     0

1     9     5     0

0 9 5 0

3 9 12 11

P2

1     3     5     3

2     3     5     6

1 0 0 3

2 8 11 7

P3

0     0     3     2

0     5     5     2

0 5 2 0

1 5 5 2

P4

0     1     1     4

0     7     5     6

0 6 4 2

2 9 12 11

Explanation / Answer

Need
A B C D
P0 0 0 0 0
P1 0 7 5 0
P2 1 0 0 2
P3 0 0 2 0
P4 0 6 4 2


2)
Yes, there exist several sequences that satisfy safety requirements (e.g.P0, P2, P1, P3, P4 )

3)

Pretend that the allocation can be made since the Available matrix is (1, 5, 2, 0), and it will now change to (1, 1, 0, 0). The next step is to find the safe sequence of processes. Alloc for P1 becomes (1,4,2,0) and Need for P1 becomes (0, 3, 3, 0).
One possible safe sequence is: P0, P2, P3, P1, P

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