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 čekanjePokušaj rešenja 3:process P1beginloopwhile turn = 2 do null end; (* Busy wait *) (* Critical section *)turn := 2; (* Exit protocol *)endend P1;Problem: suvišna sekvencijalizacija(naizmeničnost) – slaba konkurentnostprocess P2beginloopwhile turn = 1 do null end; (* Busy wait *) (* Critical section *)turn := 1; (* Exit protocol *)endend P2;54/285