11.04.2013 Views

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

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Alternância Estrita<br />

turn é global e binário – para dois processos<br />

var turn: 0..1;<br />

P0:<br />

while turn≠0 do {nothing};<br />

< critical section ><br />

turn := 1;<br />

P1:<br />

while turn≠1 do {nothing};<br />

< critical section ><br />

turn := 0;<br />

garante a <strong>exclusão</strong> <strong>mútua</strong> com alternância na execução<br />

dos diferentes processos<br />

Acesso a região crítica, de acordo com a velocidade do<br />

processo

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!