subject
Engineering, 03.09.2021 01:00 deannajd03

. Please consider the following mutual exclusion algorithm that uses the shared variables y1 and y2 (initially both 0).
Process P1:
while true do
. . . noncritical section . . .
y1 := y2 + 1;
wait until (y2 = 0) ∨ (y1 < y2)
. . . critical section . . .
y1 := 0;
od
Process P2:
while true do
. . . noncritical section . . .
y2 := y1 + 1;
wait until (y1 = 0) ∨ (y2 < y1)
. . . critical section . . .
y2 := 0;
od
Please answer following questions:
a) Give the program graph representations of both processes. (A pictorial representation suffices.)
b) Give the reachable part of the transition system of P1 || P2 where y1 ≀ 2 and y2 ≀ 2.
c) Describe an execution that shows that the entire transition system is infinite.
d) Check whether the algorithm indeed ensures mutual exclusion.
e) Check whether the algorithm never reaches a state in which both processes are mutually waiting for
each other.
f) Is it possible that a process that wants to enter the critical section has to wait ad infinitum?

ansver
Answers: 1

Another question on Engineering

question
Engineering, 04.07.2019 18:20
Derive the correction factor formula for conical nozzle i=-(1+ cosa) and calculate the nozzle angle correction factor for a nozzle whose divergence hal-fangle is 13 (hint: assume that all the mass flow originates at the apex of the cone.
Answers: 3
question
Engineering, 04.07.2019 18:20
Air flows over a heated plate Γ t a velocity of 50m/s. the local skin factor coefficient at a point on a plate is 0.004. estimate the local heat transfer coefficient at this point.the following property data for air are given: density = 0.88kg/m3 , viscosity 2.286 x 10 ^-5 kgm/s , k = 0.035w/mk ,cp = 1.001kj/kgk. use colburn reynolds analogy.
Answers: 1
question
Engineering, 04.07.2019 19:10
Ahelical coil spring has a mean diameter of 50 mm, a wire diameter of 5.5 mm and is wound with a pitch of 10 mm. the spring steel has an ultimate strength of 1250 mpa. find the force needed to compress the spring solid and the wire stress in this condition. state whether the spring will return to its initial length.
Answers: 1
question
Engineering, 04.07.2019 19:20
The power source in a certain welding setup generates 3500w that is transferred to the low carbon steel work with a heat transfer factor of 0.85. the melting factor in the operation is 0.45. a continuous fillet weld is to be made with a cross-sectional area of 23 mm2 determine the travel speed at which the welding can be accomplished.
Answers: 3
You know the right answer?
. Please consider the following mutual exclusion algorithm that uses the shared variables y1 and y2...
Questions
question
Mathematics, 25.01.2021 03:40
question
Mathematics, 25.01.2021 03:40
question
Mathematics, 25.01.2021 03:40
Questions on the website: 13722361