logo

Crowdly

Browser

Add to Chrome

En el siguiente código, el acceso exclusivo a dos recursos r1 y r2 se controla m...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

En el siguiente código, el acceso exclusivo a dos recursos r1 y r2 se controla mediante los semáforos R1 y R2 respectivamente. Para que no se produzca un interbloqueo es necesario sustituir las sentencias marcadas con *  por:

semaphore R1 ← (*, ø)

semaphore R2 ← (*, ø)

p

q

p1: wait(R1)

p2: wait(R2)

p3: usa r1 y r2 

p4: signal(R2) 

p5: signal(R1)

q1: *

 q2: *

q3: usa r1 y r2 

q4: signal(R1) 

q5: signal(R2)

0%
0%
0%
0%
More questions like this

Want instant access to all verified answers on moodle.upm.es?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome