5. Predavanje - VTS NS
5. Predavanje - VTS NS
5. Predavanje - VTS NS
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Uposleno čekanjeUslovna sinhronizacija – opšti slučaj:process P1;(*Waiting*) process P2;(*Signalling*)beginbegin... ...while flag = false do flag:=true;null ...end; end P2;...end P1;Uslovna sinhronizacija – ograničeni bafer:void BoundedBuffer::append (Data* d) {while (count==N); // Waitbuffer[tail] = d;tail = (tail+1)%N;count++; // Signal}50/285