I was watching Operating system course part 2 lecture 2 video 17. In this lecture she mentioned that the data-structure of condition variable contains mutex reference and list of waiting threads.
I want to know if it is possible to use the same condition with different mutexes?
For example: I have 2 wait statements
- wait(mutex1, condition_A)
- wait(mutex2, condition_A) //condition is the same in both
If the answer to the above question is yes, then will these two statements create two condition variables or one? Note: Lecture mentioned only one mutex reference.