Concorrência: exclusão mútua e sincronização - UFF
Concorrência: exclusão mútua e sincronização - UFF
Concorrência: exclusão mútua e sincronização - UFF
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Variável de Bloqueio<br />
Não confirma <strong>exclusão</strong> <strong>mútua</strong>:<br />
Processos entrar ao mesmo tempo em região crítica,<br />
pois dois processos podem testar turn antes de setá-la<br />
para true<br />
var turn: 0..1<br />
turn := 0<br />
Process Pi:<br />
...<br />
while turn = 1 do {nothing};<br />
turn := 1;<br />
< critical section ><br />
turn := 0;<br />
...