Is it possible to use mutex in multiprocessing case on Linux/UNIX ?
This is an interview question. Is it possible to use mutex in multiprocessing case on Linux/UNIX ? My idea: No, different processes have separate memory space. mutex is only used for multithreading. semaphore is used for multiprocessing to do synchronization. right ? Any comments are welcome. thanks Mutual exclusion locks (mutexes) prevent multiple threads from simultaneously executing critical sections of code that access shared data (that is, mutexes are used to serialize the execution of threads). All mutexes must be global. A successful call for a mutex lock by way of mutex_lock() will