Question

In: Other

Consider the following snapshot of a system:

Consider the following snapshot of a system:

           Allocation       Max          Available 

            ABCD         ABCD           ABCD

T0        3141           6473            2224

T1        2102           4232 

T2        2413           2533 

T3        4110           6332

T4        2221           5675

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 threads may complete.

 b. If a request from thread T4 arrives for (2, 2, 2, 4), can the request be granted immediately?

 c. If a request from thread T2 arrives for (0, 1, 1, 0), can the request be granted immediately?

 d. If a request from thread T3 arrives for (2, 2, 1, 2), can the request be granted immediately?

Solutions

Expert Solution

a) safe succession : T2, T0, T1, T3, T4

b) T4 arrive (2, 2, 2, 4) when T4 allocate available resource 7 7 7 8 + 2 1 0 2 + 4 1 1 0 = 13 9 9 10

which can fullfill the need + request = 5 6 7 5 + 2 2 2 4 = 7 8 9 9 So request granted.

c) let allocate resource to T3, after sometime available resource = 2 2 2 4 + 4 1 1 0 = 6 3 3 4 which can fullfill the need of T2 so granted only after T3.

d) When resource allocated to T3 available resource= 4 6 3 7

Which can fullfill the need and request of T3 So request granted.


Related Solutions

Consider the following snapshot of a system: Allocation                   Max                 Availa
Consider the following snapshot of a system: Allocation                   Max                 Available A B C D              A B C D                    A B C D P0                    0 0 1 2                0 0 1 2                      1 5 2 0 P1                    1 0 0 0                1 7 5 0 P2                    1 3 5 4                2 3 5 6 P3                    0 6 3 2                0 6 5 2 P4                   0 0 1...
Consider the following snapshot of a system that has four resource types: A, B, C, and...
Consider the following snapshot of a system that has four resource types: A, B, C, and D and five processes, P0, P1, P2, P3, and P4. Allocation Max A B C D A B C D P0 3 0 1 5 5 1 1 7 P1 2 2 1 0 3 2 1 1 P2 3 1 2 1 3 3 2 1 P3 0 5 1 0 4 6 1 2 P4 4 2 1 3 6 3 2...
Consider the following system of equations for all problems. The following system of equations is designed...
Consider the following system of equations for all problems. The following system of equations is designed to determine concentrations (the c’s in g/m3) in a series of coupled reactors as a function of the amount of mass input to each reactor (the right-hand sides in g/day). 8?1 − 4?2 − 2?3 = 2000 −3?1 + 18?2 − 6?3 = 1400 −4?1 − 2?2 + 12?3 = 3000 Calculate and interpret the condition number. Use the row-sum norm. Scale the coefficient...
1) Explain the following statement: “While the balance sheet can be thought of as a snapshot...
1) Explain the following statement: “While the balance sheet can be thought of as a snapshot of the firm’s financial position at a point in time, the income statement reports on operations over a period of time.” 2) Differentiate between accounting profit and net cash flow. Why do those two numbers differ? 3) Would it be possible for a company to report negative free cash flow and still be highly valued by investors; that is, could a negative free cash...
Consider the following inputs and outputs associated with a DCS system.
  Consider the following inputs and outputs associated with a DCS system. It is interesting to note that EXACTLY the same could be applicable to a SCADA system (although the SCADA system could use either a dedicated RTU or else a PLC). Break the following signals up (either going to, or away from the RTU-type devices) and indicate which are: i) digital inputs, ii) digital outputs, iii) analog inputs and iv) analog outputs: 18.1 ( 1 mark) START signal 18.2...
Consider the following reaction. It is occuring in a closed system and it is currently at...
Consider the following reaction. It is occuring in a closed system and it is currently at equilibrium: 2H2O(g) + Heat ↔ 2H2(g) + O2(g)   Label each of the following statements with is effect on the reaction shift towards products or shift towards reactants or no change: Removing oxygen gas. shift towards products or shift towards reactants or no change:  Cooling the reaction vessel. shift towards products or shift towards reactants or no change:  Removing water vapor from the vessel.   shift towards products...
Consider the following reaction. It is occuring in a closed system and it is currently at...
Consider the following reaction. It is occuring in a closed system and it is currently at equilibrium: 2H2O(g) + Heat ↔ 2H2(g) + O2(g)   Label each of the following statements with is effect on the reaction (shift towards products, shift towards reactants or no change) 1. Removing hydrogen gas. (shift towards products, shift towards reactants or no change) 2. Decrease the pressure on the reaction vessel (shift towards products, shift towards reactants or no change) 3. Placing the reaction vessel...
The drawing shows a snapshot of a transverse wave moving to the left on a string. The wave speed is 10.0 m/s. At the instant the snapshot is taken,
The drawing shows a snapshot of a transverse wave moving to the left on a string. The wave speed is 10.0 m/s. At the instant the snapshot is taken, (a) In what direction is point A moving? (b) In what direction is point B moving? (c) At which of these points is the speed of the string segment (not the wave speed) larger? Explain. (d) How do your answers change if the wave moves to the right instead?
Consider the following information on an inventory management system:             Item Cost:                 &nbsp
Consider the following information on an inventory management system:             Item Cost:                                $10             Order Cost:                              $250             Annual Holding Cost:              33% of item cost             Annual Demand:                     25,750             Average Demand:                   515 per week             Std. Dev. of Demand:              125 per week             Leadtime:                                2 weeks          1. Ignoring the uncertainty in the demand (i.e. looking only at average values), find the optimal order quantity and the reorder point. What is the annual inventory holding and ordering cost for this...
Consider the following processes and determine if the entropy change of the system is positive, negative,...
Consider the following processes and determine if the entropy change of the system is positive, negative, zero, or you cannot tell. Explain. (a) Liquid water is frozen to form ice. (b) 1 mol of oxygen and 2 mol of hydrogen react isothermally and completely to form 1 mol of water vapor. (c) 1 mol of oxygen and 2 mol of hydrogen react adiabatically and completely to form 1 mol of water vapor.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT