Implement Synchronization Scheme Simulates Process Travelers Boarding Planes Waiting Room Q37299229

Implement a synchronization scheme which simulates the processof the travelers boarding in planes through a waiting room ofcapacity N. New travelers arrive continuously, each of whichexecutes function traveler(). Every traveler that enters thewaiting room must do checking (ticket and passport check): executefunction cross-check(). When there are N travelers to havecompleted cross-check(), then all together leave the waiting roomand take the bus for the plane, i.e., execute: boarding_bus(),leaving the waiting room empty, available for the next batch oftravelers. You are requested to implement synchronization schemesthat respect the working mode described above, in the dottedspaces:

void traveler(){

. . .

cross_check ();

. . .

boarding_bus ();

}

USE

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.