In a barber shop there are 2 doors. customer come in 1
door, leave in other. minimum # of chairs. barber spend his
life in cutting. always barber can cut 1 customer. few
chairs in the shop. if barber busy customer waits, if
chairs full, customer leave. if no customer, barber sleeps.
treat barber and customer as 2 threads. you can use
Semaphore class with arrive and depart and count as
parameter.
No Answer is Posted For this Question
Be the First to Post Answer
What are the benefits of a jar file?
What is stateless class in java?
What is meant by annotation in java?
Is jprofiler open source?
What is gwt in java?
What does el mean in java?
How can the static main method use instance variables?
i heard that JVM internally contains pointers...is this true?
What is native api in java?
What is a yaml file in java?
How can one prove that the array is not null but empty?
What is java lang?