Pergunta de entrevista da empresa NVIDIA

Differences between mutex and semaphore, how to apply them in practice?