using semaphores for the bounded buffer problem 6525328