Pregunta de entrevista de Apple

Difference between semaphor, lock, and control variables.