Semaphore in Java

What is semaphore? Lets first talk about definition of semaphore we have read in our Operating System books: Semaphore is a counter (integer) value with help of which, process allows a thread to get into a critical region. If the value of the counter is greater than 0, the counter Read more…