Question

Consider the following snapshot of a system:

Consider the following snapshot of a system: 

image.png

Using the banker's algorithm, determine whether or not each of the following states is unsafe. If the state is safe, illustrate the order in which the processes may complete. Otherwise, illustrate why the state is unsafe. 

a. Available = (0,2,0,1) 

b. Available = (2, 0, 0, 2)

3 0
Add a comment Improve this question Transcribed image text
✔ Recommended Answer
Answer #1

Let's see the need of each process which is given by max-allocation.

NEEDABCD
P03103
P11001
P20100
P34202
P41113

A) Available=(0, 2,0,1)

Any process can be executed if its need is less than or equal to the available resource.

Here initially, P2's request can be completed.

After executing P2's request, newly available matrix is (3, 3,2,2)

Now, P1's request can be satisfied. Newly available resource matrix is : (5, 3,3,5)

Now rest all processes can be satisfied since their need is less than functional. Thus the given system is in a SAFE state since the processes request can be met in some order.

One of the possible sequence is :

P2->P1->P0->P3->P4

B) Available : (2, 0,0,2)

Initially, P1's request can be satisfied since its need is less than available.

Then newly available resource matrix is :(4, 2,1,2)

Now, P2's request can be satisfied. After executing P2, newly available resource matrix is : (7, 3,3,3)

Now all the process requests can be satisfied since it needs is less than available.

Thus in this second case also, the system is in a SAFE state.

One of the possible executing sequences is :

P1->P2->P0->P3->P4.


Add a comment
Know the answer?
Add Answer to:
Consider the following snapshot of a system:
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Similar Homework Help Questions
  • Consider the following snapshot of a system: Process РО P1 P2 P3 P4 Allocation A B...

    Consider the following snapshot of a system: Process РО P1 P2 P3 P4 Allocation A B C D 2013 2 2 1 0 3 1 2 1 0 4 1 0 4 2 1 2 Max A B C D 5 1 1 6 3 2 1 1 3 2 2 1 4 6 1 2 5 3 2 5 Using the banker's algorithm, determine whether or not each of the following states is unsafe. If the state is safe,...

  • Can someone help me out with this problem? 3.Deadlocks-120 points) a. What are the factors that you should consid ermination in the case of deadlocks? b. Consider the following snapshot of a system:...

    Can someone help me out with this problem? 3.Deadlocks-120 points) a. What are the factors that you should consid ermination in the case of deadlocks? b. Consider the following snapshot of a system: Using the Banker's algorithm, determine whether or not each f thi unsafe. if the state is ara(co actors that you should consider when a process is seleted for lustrate the order in which the processes may complete Otherwise,llustrate why the state is unsafe. a). Available (0,3,0,1) b)....

  • 2. Consider the following snapshot of a system:

    Banker's Algorithm2. Consider the following snapshot of a system: Answer the following questions using the banker's algorithm: a. What is the content of the matrix Need? b. Illustrate that the system is in a safe state by demonstrating an order in which the processes may complete. c. Using the available work, if a request from process Pi arrives for (0.4.2.0). can

  • Consider the following snapshot of a system:   Allocation Max Available ABCD ABCD ABCD P0 1121 2233...

    Consider the following snapshot of a system:   Allocation Max Available ABCD ABCD ABCD P0 1121 2233 2212 P1 2122 5445 P2 3010 3121 P3 1001 2311 P4 2000 3221 Answer the following questions using the banker`s algorithm: a) Illustrate that the system is in a safe state by demonstrating an order in which the processes may complete. Give the Available matrix after completion of each process.

  • Answer the following question: Allocation Available A B C D 3 3 2 1 Ро P1...

    Answer the following question: Allocation Available A B C D 3 3 2 1 Ро P1 A B C D 2001 3121 2103 1312 1 432 Max ABCD 4212 5252 2316 1424 36 65 P2 P3 P4 The snapshot of a system 1) Illustrate that the system is in a safe state by demonstrating an order in which the processes may complete. (Format: use process number only, e.g. 01234) 2) If a request from process P1 arrives for (1,1,0,0), can...

  • 10-13. For the systems described below, given that all of the devices are of the same...

    10-13. For the systems described below, given that all of the devices are of the same type, and using the definitions presented in the discussion of the Banker's Algorithm, answer these questions: a. Calculate the number of available devices. b. Determine the remaining needs for each job in each system. c. Determine whether each system is in a safe state or an unsafe state. d. If the system is in a safe state, list the sequence of requests and releases...

  • Subject : Operating System Banker's Algorithm:             processes = {0, 1, 2, 3, 4};             Available...

    Subject : Operating System Banker's Algorithm:             processes = {0, 1, 2, 3, 4};             Available instances of resources             avail = {3, 4, 2};             Maximum R that can be allocated to processes             maxm[][R] = {{7, 5, 3},                                                 {3, 2, 2},                                                 {9, 0, 2},                                                 {2, 2, 1},                                                 {4, 3, 3}};             Resources allocated to processes             allot[][R] = {{0, 1, 0},                                                 {2, 0, 0},                                                 {3, 0, 2},                                                 {2, 1, 2},                                                ...

  • 5. Provide the Need table for the following Processes Process Allocated Maximum R1 R2 R3 R4...

    5. Provide the Need table for the following Processes Process Allocated Maximum R1 R2 R3 R4 R1 R2 R3 R42 РОe 02122212 552527 P12 120 121 2 324344-12 P2 1212222222222232 P3 1 2022 252 42 325 P44 12010026825272 Process Available. R14 R2 R3 R4 POH 2 2012 () Using the Banker's algorithm, determine if the system is in a safe state, and if so, state the safe sequence.

  • 1. How can we use semaphores to implement condition variables 2. Consider a system with 10...

    1. How can we use semaphores to implement condition variables 2. Consider a system with 10 tape disk drives and 3 processes P1, P2, and P3. The table below gives a snapshot of the system at a point in time. Formally show whether the system is in the safe state.    Process    Maximum Needs   Current Needs     P1    10    5    P2    4    2     P3    5    3

  • The following snapshot is not in a safe state. Explain in two to three sentences why...

    The following snapshot is not in a safe state. Explain in two to three sentences why there may or may not be a deadlock situation Note there are two separate resource pools for each process. Process Accessed Needed Still Needed Accessed Needed Still Needed P1 5 4 4 3 P2 2 4 2 4

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT