Mutex and Progess Question

imported_nautique

Senior member
Jul 14, 2004
346
0
0
I am given the usual Producer Consumer model with 2 while loops for each.
the producer looks like (in and out initialized to 0)

while(((in+1) % n) == out);
change value of in
then some actions

while the consumer looks like
while(in == out);
change value of out and more actions

is mutex always satisfied....only by certain cases...or never?
And if progress satisfied?

I think no for mutex because if there is an interrupt after we enter the critical section of the producer and enter the consumer critical section that violates mutex.

And I think that progress is always satisfied.