Domanda di colloquio di ByteDance

What is the difference between mutex and semaphore