Dining philosophers problem in Java using Semaphores