1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Nesterboy [21]
3 years ago
5

Consider a system having p processes, where each process needs a maximum of m instances of resource type R1. Given that there ar

e r instances of resource type R1 in total, what is the minimum value of r as a function of p and m to ensure that the system is deadlock free?(An explanation in addition to the formula would be very helpful, thanks)
Engineering
1 answer:
Genrish500 [490]3 years ago
5 0

Answer:

Consider a system consisting of 4 resources of same type that are share by 3 processes each of which needs at most two resources.Now we will show that the system is deadlock free.

If the system is deadlocked, it implies that each process is holding one resource and is waiting for one more. Since there are 3 processes and 4 resources, one process must be able to obtain two resources. This process requires no more resources and therefore it will return its resources when done.

Consider a system with m resources of same type being shared by n processes. Resources can be requested and released by processes only on at a time. The system is deadlock free if and only if The sum of all max needs is < m+n .

We can understand the notion of a deadlock from the following simple real-life example.To be able to write a letter one needs a letter pad and a pen. Suppose there in one letterpad and one pen on a table with two persons seated around the table. We shall identify these two persons as Mr. A and Ms. B. Both Mr. A and Ms. B are desirous of writing a letter. So both try to acquire the resources they need. Suppose Mr. A was able to get the letter pad. In the meantime, Ms. B was able to grab the pen. Note that each of them has one of the two resources they need to proceed to write a letter. If they hold on to the resource they possess and await the release of the resource by the other, then neither of them can proceed. They are deadlocked. We can transcribe this example for processes seeking resources to proceed with their execution. Consider an example in which process P1 needs three resources r1 ; r2, and r3 before it can make any further progress. Similarly, process P2 needs two resources r2 and r3 Also, let us assume that these resources are such that once granted, the permission to use is not withdrawn till the processes release these resources. The processes proceed to acquire these resources. Suppose process P1 gets resources r1 and r3 and process P2 is able to get resource r2 only. Now we have a situation in which process P1 is waiting for process P2 to release r2 before it can proceed. Similarly, process P2is waiting for process P1 to release resource r3 before it can proceed. Clearly, this situation can be recognized as a deadlock condition as neither process P1 nor process P2 can make progress. Formally, a deadlock is a condition that may involve two or more processes in a state such that each is waiting for release of a resource which is currently held by some other process.

You might be interested in
What are some things that AREN’T manufactured
snow_lady [41]
Ray Bans
Arrow Shirts
Gillette
3 0
3 years ago
Water flows in a pipeline. At a point in the line where the diameter is 7 in., the velocity is 12 fps and the pressure is 50 psi
PolarNik [594]

Answer:

a)   P₂ = 3219.11 lbf / ft² , b)    P₂ = 721.91 lbf / ft² , c)  P₂ = 5707.31 lbf / ft²

Explanation:

For this exercise we can use the fluid mechanics equations, let's start with the continuity equation, index 1 is for the starting point and index 2 for the end point of the reduction

     A₁ v₁ = A₂ v₂

     v₂ = v₁ A₁ / A₂

The area of ​​a circle is

    A = π r² = π/4  d²

     v₂ = v₁ (d₁ / d₂)²

Let's calculate

    v₂ = 12 (7/3)²

    v₂ = 65 feet / s

Now let's use Bernoulli's equation

     P₁ + ½ ρ v₁² + ρ g y₁ = P₂ + ½ ρ v₂² + ρ g y₂

     P₁ - P₂ = ρ g (y₂ –y₁) + ½ ρ (v₂² - v₁²)

Case 1. The pipe is horizontal, so

      y₁ = y₂

      P₁ - P₂ = ½ ρ  (v₂² –v₁²)

      P₂ = P₁ - ½ ρ (v₂² –v₁²)

     ρ = 62.43 lbf / ft³

     P₁ = 50 psi (144 lbf/ ft² / psi) = 7200 lbf / ft²

    P₂ = 7200 - ½ 62.43 / 32 (65² -12²)

    P₂ = 7200 - 3980.89

    P₂ = 3219.11 lbf / ft²

Case 2 vertical pipe with water flow up

        y₂ –y₁ = 40 ft

        P₁ - P₂ = ρ g (y₂ –y₁) + ½ rho (v₂² - v₁²)

        7200 - P₂ = 62.43 (40) + ½ 62.43 / 32 (65 2 - 12 2) =

        P₂ = 7200 - 2497.2 - 3980.89

         P₂ = 721.91 lbf / ft²

Case 3. Vertical water pipe flows down

         y₂ –y₁ = -40

         P₂ = 7200 + 2497.2 - 3980.89

         P₂ = 5707.31 lbf / ft²

3 0
3 years ago
What will the following segment of code output? score = 95; if (score &gt; 95) cout &lt;&lt; "Congratulations!\n"; cout &lt;&lt;
Anarel [89]

Answer:

That's a high score!

This is a test question!

Explanation:

The reason these two lines are printed and not the first one is simple. After the 'IF' condition has been stated, there is no use of parenthesis such as { and } to enclose the next lines. This means that only the first line after the 'IF' condition may be read or skipped depending on whether the condition (score>95) is met. Since the score is not larger than 95, and the 'IF' condition fails, the line 'Congratulations!' is not printed. The next two lines of the code are read as normal because they do not depend on the 'IF' condition.

5 0
3 years ago
a piping system has an internal air pressure of 1,500 kpa. In addition to being subject to the air pressure, the piping supports
Alik [6]

Answer:

See explaination

Explanation:

please kindly see attachment for the step by step solution of the given problem.

5 0
4 years ago
PWM input and output signals are often converted to analog voltage signals using low-pass filters. Design and simulate the follo
Temka [501]

Answer:

Attached below

Explanation:

PWM signal source has 1 KHz base frequency

Analog filter : with time constant = 0.01 s

low pass transfer function = \frac{1}{0.01s + 1 }

PWM duty cycle is a constant block

Attached below is the design and simulation into Simulink at 25% , 50% and 100% respectively

5 0
3 years ago
Other questions:
  • The legend that Benjamin Franklin flew a kite as a storm approached is only a legend—he was neither stupid nor suicidal. Suppose
    5·1 answer
  • One kilogram of water fills a 150-L rigid container at an initial pressure of 2 MPa. The container is then cooled to 40∘C. Deter
    7·1 answer
  • Consider film condensation on a vertical plate. Will the heat flux be higher at the top or at the bottom of the plate? Why?
    5·1 answer
  • (a) Consider a germanium semiconductor at T 300 K. Calculate the thermal equilibrium electron and hole concentrations for (i) Nd
    7·1 answer
  • Calculate the convective heat-transfer coefficient for water flowing in a round pipe with an inner diameter of 3.0 cm. The water
    8·1 answer
  • Chad is working on a design that uses the pressure of steam to control a valve in order to increase water pressure in showers. W
    10·1 answer
  • Choose the best compression ratio for an Otto cycle reciprocating engine: a. 5 b. 10 c. 15 d. 20
    14·1 answer
  • In the 1960s through 1980s, a medical filter manufacturer in Ann Arbor discharged 1,4-dioxane (an industrial solvent) directly i
    15·2 answers
  • What is the number model for three families live in the same apartment
    8·2 answers
  • The primary of an ideal transformer has 400 turns and its secondary has 200 turns. Neglecting electrical losses, if the power in
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!