Work Sheet 5
- What is a monitor?
- What is a conditon inside a monitor?
- Jurassic Park consists of a dinosaur Museum and a park for safari riding.
There are m passengers and n single passanger cars. Passengers wander
around the mnusueum for a while, then line up to take a ride in a safari car.
When a car is available, it loads the one passanger it can hold and rides
around the park for a random amount of time. If the n cars are all out riding
passangers around, then a passanger who wants to ride waits. Use semaphores
to sy synchronize m passanger processes and n car processes.
- Do problems 6.8, 6.14 and6.16