Infosys interview question

Q: Producer and Consumer problem