Question: Multithreading C + + I am trying to make a simulation of behavior of customers ( patrons ) at a post office of up to
Multithreading C
I am trying to make a simulation of behavior of customers patrons at a post office of up to patrons at a post office. Each patron will arrive at the post office, wait for an available clerk, get the help they need, and leave the post office. Each patron will be represented by a separate thread created by a main program. This thread will synchronize with other threads to ensure that each patron will have exclusive access to one of the post office clerks. To achieve this, we must use Pthread mutexes and condition variables. SEMAPHORES NOT ALLOWED.
A txt file will be used to pass through the program.
Arnold
Bill
Carol
Dill
The program should print out a message every time a patron:
Arrives at the post office
Starts getting help
Leaves the post office
At the very end of the program, you should get a display that reads:
Total number of patrons served
Number of patrons that did not have to wait
The number of patrons that waited
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
