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 s
Not quite. POSIX threads has a concept of a process-shared attribute which can be used to create mutexes that can be operated on by multiple processes.
You can put such a mutex in shared memory so that multiple processes can all get at it.
Whether LINUX implements this., I'm not sure, I've never had a need to use it since it seems unnecessarily complex.
For a useful precis of attributes, see my answer to this question.