embedUR systems interview question

What is the difference between mutex and semaphore?