In the shared-bathroom problem, there are two classes of threads, called MALE and FEMALE. There is a single Bathroom resource that must be used in the following way:
1. Mutual exclusion: persons of opposite sex may not occupy the bathroom simultaneously.
2. Weak starvation-freedom: Assuming that eventually there will be both a male and a female who want to use the bathroom, then everyone who needs to use the bathroom eventually enters.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here