Pregunta de entrevista de Tata Consultancy Services

How do you write the Producer Consumer problem.