- Compare performance => Input = 10000
- Analysis(why?) => Mutex : Only one thread holding the lock enters (A mutex can be unlocked by who locked it)
Semaphore : Multiple enters with a counter (There is no lock owner concept)
Mutex use hardware for only one thread. In contrast, Semaphore use hardware for many threads. Therefore, Mutex is faster than Semaphore.
- OS environment => WSL2