I have 2 doubts
1)what is the default value of a mutex ?
Is it 0 or 1?
2)Why cant we have a code like, this to solve the Concurrency issues. I mean, i know its not possible, but this was asked to me at an interview ...
if(pid == 1)
{
/* give CS to Process1 */
set pid =2;
}
else
{
/* give CS to Process2 */
set pid=1;
}