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, 03.07.2019 14:10
The y form of iron is known as: a) ferrite b) cementite c) perlite d) austenite
Answers: 3
question
Engineering, 04.07.2019 18:10
Afull journal bearing has a journal diameter of 27 mm, with a unilateral tolerance of -0.028 mm. the bushing bore has a diameter of 27.028 mm and a unilateral tolerance of 0.04 mm. the l/d ratio is 0.5. the load is 1.3 kn and the journal runs at 1200 rev/min. if the average viscosity is 50 mpa-s, find the minimum film thickness, the power loss, and the side flow for the minimum clearance assembly.
Answers: 1
question
Engineering, 04.07.2019 18:10
Ajournal bearing has a journal diameter of 3.250 in with a unilateral tolerance of 20.003 in. the bushing bore has a diameter of 3.256 in and a unilateral tolerance of 0.004 in. the bushing is 2.8 in long and supports a 700-lbf load. the journal speed is 900 rev/min. find the minimum oil film thickness and the maximum film pressure for both sae 20 and sae 20w-30 lubricants, for the tightest assembly if the operating film temperature is 160°f. a computer code is appropriate for solving this problem.
Answers: 3
question
Engineering, 04.07.2019 18:10
Water in a partially filled large tank is to be supplied to the roof top, which is 8 m above the water level in the tank, through a 2.2-cm-internal-diameter pipe by maintaining a constant air pressure of 300 kpa (gage) in the tank. if the head loss in the piping is 2 m of water, determine the discharge rate of the supply of water to the roof top in liters per second.
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, 04.05.2021 23:40
Questions on the website: 13722363