successfully implemented producer-consumer with Semaphore