NVIDIA interview question

Implement producer/consumer problem.