mutex , semaphore, monitor, condition variable No ratings yet.

mutex, semaphore,  monitor, condition variable are basic computer science concepts, but can easily get confused. some notes here. mutex:  thread has ownership, released by the one who acquired it.  no execution order ( motivation for semaphore’s schedule constraint) it is usually available in the libc/glibc pthread implementation. source code of pthread_mutex_lock() at:;a=blob;f=nptl/pthread_mutex_lock.c;h=493fe4377821c3e14382eeb32a6c6ef414a9289c;hb=e0043e17dfc52fe1702746543127cb4a87232bcd semaphore:  basically manipulate the • Read More »