Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Semaphores

Write a program that simulates via a Semaphore a day at the barbershop. Mainly, our barbershop can serve maximum three persons at a time (has only three seats). When a person arrives at the barbershop, he tries to take a seat. After it is served by a barber, the person releases the seat. If a person arrives at the barbershop when all three seats are taken, he must wait for a certain amount of time. If this time elapses and no seats have been freed, he will leave the barbershop.

Morty Proxy This is a proxified and sanitized view of the page, visit original site.