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

3. A system has three processes, Pl, P2, and P3, and four resource classes, whic

ID: 3607126 • Letter: 3

Question

3. A system has three processes, Pl, P2, and P3, and four resource classes, which are 4 tape drives, 2 plotters, 3 scanners, and 1 CD-ROM, respectively. The existing resource vector, C (423 1) () A an instant of time, 1 plotter and 2 scanners are assigned to P1, 2 tape drives and 1 CD-ROM are assigned to P2, I scanner is assigned to P3. Find the current allocation matrix, A, and available resource vector, R. (2) After a quantum of time passed, Pl request for 2 tape drives and Iplotters, P2 requests for 1 tape drive and I scanner, P3 further requests 2 tape drives and 1 CD-ROM. Find the need matrix, N. (3) In above situation, is the entire system deadlocked? If yes, what resources are involved? If not, what is the possible sequence to run these processes?

Explanation / Answer

1) Allocation Matrix
        r1   r2   r3 r4
    p1 0     1    2 0
    p2 2     0    0 1
    p3 0     0    1 0

    r1- tape drive
    r2 - plotter
    r3 - scanner
    r4 -cd-rom

    Available Resource Vector (2,1,0,0)

2 Need Matrix
        r1   r2   r3 r4
    p1 2     1    0 0
    p2 1     0    1 0
    p3 2     0    0 1

3. Need can not be fullfilled at the same time. It is dead locked.only p1 needs
   can be fullfilled. But p2 and p3 needs pertaining to r1,r3 and r4 can not be
   fullfilled.
   A possible sequence is
    run p1 first
    run p2 second
    run p3 third

1) Allocation Matrix
        r1   r2   r3 r4
    p1 0     1    2 0
    p2 2     0    0 1
    p3 0     0    1 0

    r1- tape drive
    r2 - plotter
    r3 - scanner
    r4 -cd-rom

    Available Resource Vector (2,1,0,0)

2 Need Matrix
        r1   r2   r3 r4
    p1 2     1    0 0
    p2 1     0    1 0
    p3 2     0    0 1

3. Need can not be fullfilled at the same time. It is dead locked.only p1 needs
   can be fullfilled. But p2 and p3 needs pertaining to r1,r3 and r4 can not be
   fullfilled.
   A possible sequence is
    run p1 first
    run p2 second
    run p3 third

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