1
$\begingroup$

I understand you can use process wide mutexes, but does this still apply if you have an additional virtualized operating system provisioned?

For example, take two OSes: O1 and O2 where O2 is a virtualized OS provisioned on O1. Now take some code C that uses a process-wide mutex. Run C on O1 and O2. Assuming they have access to the same resource through some file sharing mechanism (e.g. guest additions.) Does the mutex still work?

$\endgroup$
2
$\begingroup$

For most implementations of a mutex it won't work, but in principle it depends on how the mutex is implemented. If the mutex was implemented using files, perhaps it could be made to work. Usually the mutex is managed by the operating system, and the operating system keeps track of the state of the mutex, so both processes have to be running in the same operating system to be able to share a mutex.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.