Notes From CS Undergrad Courses FSU
This project is maintained by awa03
semaphore flyingPath=1; // scheduling
P(flyingPath);
// sending message
V(flyingPath);
semaphore flyingPath= 1;
P(flyingPath);
// send the message
V(flyingPath);
/* ------------------------------------------------ */
int BirdsInTransit = 0;
++BirdsInTransit;
if(BirdsInTransit == 1){
P(flyingPath);
}
// sends message
--BirdsInTransit;
if(BirdInTransit == 0){
V(flyingPath);
}