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.
Bouw e<strong>en</strong> semafoor met e<strong>en</strong> monitor<br />
monitor semafoor {<br />
}<br />
static unsigned int waarde = 0;<br />
static condition V_called;<br />
void P(){<br />
}<br />
if (waarde == 0) wait(V_called);<br />
waarde--;<br />
void V(){<br />
}<br />
waarde++;<br />
signal(V_called);<br />
College OS 2010 – 2011 38