Concurrency en race condities
Concurrency en race condities
Concurrency en race condities
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Poging 2<br />
<strong>en</strong>um {false, true} nul_wil = false, e<strong>en</strong>_wil = false;<br />
• Thread 0<br />
nul_wil = true;<br />
while (e<strong>en</strong>_wil);<br />
/* kritieke sectie 0 */<br />
nul_wil = false;<br />
• Thread 1<br />
Wat gaat er nu mis?<br />
e<strong>en</strong>_wil = true;<br />
while (nul_wil);<br />
/* kritieke sectie 1 */<br />
e<strong>en</strong>_wil = false;<br />
College OS 2010 – 2011 12