Complete the following assignment in APA style:
problem 1: Busy Waiting:
Is there any benefit to busy waiting? Discuss.
problem 2: Barrier Synchronization:
Discuss an application that would benefit from the use of barrier synchronization.
problem 3: Barber Problem Monitor
A barbershop comprises of a waiting room with ‘n’ chairs and a barber room with one barber chair. If there are no customers to be served, then the barber goes to sleep. If a customer enters the barbershop and all chairs are occupied, then the customer leaves the shop. If the barber is busy, though chairs are available, then the customer sits in one of the free chairs. If the barber is asleep, then the customer wakes up the barber. Make a pseudo-code solution by using a monitor which synchronizes customers and barbers.