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
Kobotan [32]
4 years ago
10

Race conditions are possible in many computer systems. Consider an online auction system where the current highest bid for each

item must be maintained. A person who wishes to bid on an item calls the bid(amount) function, which compares the amount being bid to the current highest bid. If the amount exceeds the current highest bid, the highest bid is set to the new amount. This is illustrated below:double amount = 0.0;void bid(double amount) { if (amount > highestBid) highestBid = amount;}Describe how a race condition is possible in this situation (you may describe it with some scenario)?What might be done to prevent the race condition from occurring? (you may just modify the code using "acquire()" and "release()" statements)

Engineering
1 answer:
kumpel [21]4 years ago
5 0

Answer:

See attached picture.

Explanation:

You might be interested in
5 kg of a wet steam has a volume of 2 m3
Verizon [17]
Have you seen the state of her body. Mad. If I wear it I ain’t wearing a jolly. ADEOLA wanna ride in the gysa
4 0
3 years ago
Rod of steel, 200 mm length reduces its diameter (50 mm) by turning by 2 mm with feed speed 25 mm/min. You are required to calcu
diamong [38]

Answer:

125 cm³/min

Explanation:

The material rate of removal is usually given by the formula

Material Rate of Removal = Radial Depth of Cut * Axial Depth of Cut * Feed Rate, where

Radial Depth of Cut = 25 mm

Axial depth of cut = 200 mm

Feed rate = 25 mm/min

On multiplying all together, we will then have

MRR = 25 mm * 200 mm * 25 mm/min

MRR = 125000 mm³/min

Or we convert it to cm³/min and have

MRR = 125000 mm³/min ÷ 1000

MRR = 125 cm³/min

4 0
3 years ago
A liquid water turbine receives 2 kg / s water at 2000 kPa, 20°C with a velocity of 15 m / s . The exit is at 100 kPa, 20°C, a
sveta [45]

Peppa Pig sjsjssjssjsjsjsjsjssjjsss

3 0
3 years ago
Briefly discuss if it would be better to operate with pumps in parallel or series and how your answer would change as the steepn
Aleksandr [31]

Answer:

1) In series, the combined head will move from point 1 to point 2 in theory. However, practically speaking, the combined head and flow rate will move along the system curve to point 3.

2) In parallel, the combined head and volume flow will move along the system curve from point 1 to point 3.

Explanation:

1) Pump in series:

When two or more pumps are connected in series, their resulting pump performance curve will be obtained by adding their respective heads at the same flow rate as shown in the first diagram attached.

In the first diagram, we have 3 curves namely:

- system curve

- single pump curve

- 2 pump in series curve

Also, we have points labeled 1, 2 and 3.

- Point 1 represents the point that the system operates with one pump running.

- Point 2 represents the point where the head of two identical pumps connected in series is twice the head of a single pump flowing at the same rate.

- Point 3 is the point where the system is operating when both pumps are running.

Now, since the flowrate is constant, the combined head will move from point 1 to point 2 in theory. However, practically speaking, the combined head and flow rate will move along the system curve to point 3.

2) Pump in parallel:

When two or more pumps are connected in parallel, their resulting pump performance curve will be obtained by adding their respective flow rates at same head as shown in the second diagram attached.

In the second diagram, we have 3 curves namely:

- system curve

- single pump curve

- 2 pump in series curve

Also, we have points labeled 1, 2 and 3

- Point 1 represents the point that the system operates with one pump running.

- Point 2 represents the point where the flow rate of two identical pumps connected in series is twice the flow rate of a single pump.

- Point 3 is the point where the system is operating when both pumps are running.

In this case, the combined head and volume flow will move along the system curve from point 1 to point 3.

5 0
3 years ago
An isentropic steam turbine processes 2 kg/s of steam at 3 MPa, which is exhausted at50 kPa and 100C. Five percent of this flow
borishaifa [10]

Answer:

2285kw

Explanation:

since it is an isentropic process, we can conclude that it is a reversible adiabatic process. Hence the energy must be conserve i.e the total inflow of energy must be equal to the total outflow of energy.

Mathematically,

\\ E_{inflow} = E_{outflow}

Note: from the question we have only one source of inflow and two source of outflow (the exhaust at a pressure of 50kpa and the feedwater at a pressure of 5ookpa). Also the power produce is another source of outgoing energy    \\ E_{inflow} = m_{1} h_{1} .

\\

E_{outflow} = m_{2} h_{2} + m_{3} h_{3} + W_{out}

\\

Where m_{1} h_{1} are the mass flow rate and the enthalpies at the inlet  at a pressure of 3Mpa \\,

m_{2} h_{2} are the mass flow rate and the enthalpies  at the outlet 2 where we have a pressure of 500kpa respectively.\\,

and  m_{3} h_{3}   are the mass flow rate and the enthalpies  at the outlet 3 where we have a pressure of 50kpa respectively.\\,

We can now express write out the required equation by substituting the new expression for the energies \\

m_{1} h_{1} = m_{2} h_{2} + m_{3} h_{3} + W_{out}   \\

from the above equation, the unknown are the enthalpy values and  the mass flow rate. \\

first let us determine the enthalpy values at the inlet and the out let using the Superheated water table.  \\

It is more convenient to start from outlet 3 were we have a temperature 100^{0}C and pressure value of (50kpa or 0.05Mpa ). using double interpolation method  on the superheated water table to determine the enthalpy value with careful calculation we have  \\

h_{3}  = 2682.4 KJ/KG , at this point also from the table the entropy value ,s_{3} value is 7.6953 KJ/Kg.K. \\

Next we determine the enthalphy value at outlet 2. But in this case, we don't have a temperature value, hence we use the entrophy value since the entropy  is constant at all inlet and outlet. \\

So, from the superheated water table again, at a pressure of 500kpa (0.5Mpa) and entropy value of  7.6953 KJ/Kg.K with careful  interpolation we arrive at a enthalpy value of 3206.5KJ/Kg.\\

Finally for inlet one at a pressure of 3Mpa, interpolting with an entropy value of 7.6953KJ/Kg.K  we arrive at enthalpy value of 3851.2KJ/Kg. \\

Now we determine the mass flow rate at each inlet and outlet. since  mass must also be balance, i.e  m_{1} = m_{2} + m_{3} \\

From the question the, the mass flow rate at the inlet m_{1}}  is 2Kg/s \\

Since 5% flow is delivered into the feedwater heating,  \\

m_{2} = 0.05m_{1} = 0.05 *2kg/s = 0.1kg/s \\

Also for the outlet 3 the remaining 95% will flow out. Hence

m_{3} = 0.95m_{1} = 0.95 *2kg/s = 1.9kg/s \\

Now, from m_{1} h_{1} = m_{2} h_{2} + m_{3} h_{3} + W_{out}   \\ we substitute values

W_{out} = m_{1} h_{1}-m_{2} h_{2}-m_{3} h_{3}

W_{out} = (2kg/s)(3851.2KJ/Kg) - (0.1kg/s)(3206.5kJ/kg)- (1.9)(2682.4kJ/kg)

\\

W_{out} = 2285.19 kW.

Hence the power produced is 2285kW

7 0
3 years ago
Other questions:
  • A converging-diverging nozzle is designed to operate with an exit Mach number of 1.75 . The nozzle is supplied from an air reser
    15·1 answer
  • The popularity of orange juice, especially as a breakfast drink, makes it an important factor in the economy of orange-growing r
    14·1 answer
  • Material with hardness of 220 Vickers is harder than material with a hardness of 180 Vickers. a)-True b)- False
    8·1 answer
  • Give two methods on how powder is produced in powder metallurgy.
    5·2 answers
  • Consider a normal shock wave in air. The upstream conditions are given by M1=3, p1 = 1 atm, and r1 = 1.23 kg/m3. Calculate the d
    15·1 answer
  • What is Euler's equation?
    6·1 answer
  • What overall material composition would be required to give a material made up of 50wt% mullite and 50wt% alumina at 1400°C?
    5·1 answer
  • What is 3'-9" in feet?
    11·1 answer
  • What is the eye an example of?<br><br><br><br> sense organ<br> stimulus <br> a relay neuron
    14·1 answer
  • The metal control joints used to relieve stresses caused by expansion and contraction in large ceiling or wall expenses in inter
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!