Pergunta de entrevista da empresa Qualcomm

What is the difference between mutex and semaphore?