There are m passengers and n single passenger cars.
Passengers wander around the museum for a while, then line up to take a ride in a safari car.
When a car is available, it loads the one passenger it can hold and rides around the park for a random amount of time. Use semaphores to synchronize the m passenger processes and the n car processes. Also show a timing diagram that indicates the sequence of actions for several interleavings. When a reader is active, new readers may start immediately. When a writer finishes, a new writer has priority, if one is waiting.