Pergunta de entrevista da empresa NVIDIA

Describe how the producer-consumer problem works

Resposta da entrevista

Sigiloso

21 de ago. de 2011

We started a discussion of the producer consumer problem and how I would handle synchronization/concurrency issues when solving the problem. I understood the problem fairly well because I had just learned it, so I was able to correct the interviewer on several points (e.g. he only remembered that the consumer has to sleep if the buffer is empty, but not that the producer has to sleep if the buffer is full. Maybe he thought all buffers were infinite size?).