https://image3.slideserve.com/5621867/producer-consumer-with-semaphores1-t.jpg