Question

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},

                                                {0, 0, 2}};

            Check system is in safe state or not

            isSafe(processes, avail, maxm, allot);

(1)Is this a safe state? If it is a safe state, give a safe sequence.

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

Need = Max - Allocation

Need = w N لیا تم

It is safe

Safe sequence is 1, 3, 0, 2 and 4

Please up vote

Add a comment
Know the answer?
Add Answer to:
Subject : Operating System Banker's Algorithm:             processes = {0, 1, 2, 3, 4};             Available...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • operating system 6) Banker's algorithm is used in deadlock avoidance, and the following table presents the...

    operating system 6) Banker's algorithm is used in deadlock avoidance, and the following table presents the current situation: hAvailable e Need Allocation 2 31vqas 5 2 3 1 10 PO 1 20 P1 2 0 1 4 20 P2 1 0 2 no0 1 1 to P3 43 1 3 3 2 P4 1 12 Questions: (1) is the current situation safe? (2) if PO requests (2, 2, 0), will the system allocate the resources? (3) if PO requests (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.

  • Please give an explanation for the answers as well. 1. A system has three processes (P1,...

    Please give an explanation for the answers as well. 1. A system has three processes (P1, P2, and P3) and three resources (R1, R2, and R3). There is one instance of RI, two instances of R2, and three instances of R3. PI holds RI and one instance of R3 and is requesting one instance from R2. P2 holds one instance of R3 and is requesting RI and one instance from R2. P3 holds two instances of R2 and one instance...

  • 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...

  • Assume in a system, there are: - 3 processes P1 to P3; - 3 resource types:...

    Assume in a system, there are: - 3 processes P1 to P3; - 3 resource types: A(9 instances), B(5 instances), and C(5 instances). Below is a snapshot at time T: 1) Show that the system is in a safe state at time T. 2) Can request for (A: 2, B: 0, C: 0) by P1 be granted? Explain your answer. Thank you so much, and it would be much better if it is well written and explained. Allocation Max Pl...

  • 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,...

  • Part B (10) Deadlock Avoidance Consider the following maximum-claim reusable resource system with four processes and...

    Part B (10) Deadlock Avoidance Consider the following maximum-claim reusable resource system with four processes and three resource types. The maximum claim matrix is given by C [4 3 5 11 1 41 1 4 6 13 1 6] where Cij denote maximum claim of process i for resourcej. The total units of each resource type are given by the vector (5, 8, 15). The current allocation of resources is given by the matrix To 1 4] 2 0 1...

  • a. A system has two processes and three identical resources. Each process needs a maximum of...

    a. A system has two processes and three identical resources. Each process needs a maximum of two resources. Is deadlock possible? Explain your answer. b. A system has 4 processes, P1 through P4, and 5 types of resources, R1 through R5. Existing resource vector E = (3, 2, 1, 2, 2) Current allocation matrix C = R1 R2 R3 R4 R5 P1 1 1 0 0 0 P2 0 0 1 0 0 P2 1 0 0 20 P4 0...

  • Subject: Operating System. Question 3) Assuming a system has 86 available frames and there are two...

    Subject: Operating System. Question 3) Assuming a system has 86 available frames and there are two processes P1 with size 20 and P2 with size 100, set up the equations to determine how many frames will be assigned to P1 and P2 using the proportional allocation frame allocation scheme.

  • 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...

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