0
Wait (i) {
      c[i]=false;
       while ( c[1-i]) do;
}


Signal (i) {
     c[i]=true;
}

each process try to enter to critical section (CS) for infinite times. process use wait(i) for enter CS, and Signal(i) for exit of CS. i in {0,1} be a number of process. C be an array with length=2 from binary variable that initialized with True.

Which of them is False:

a) this solution satisfy the Mutual Exclusion.

b) this solution satisfy the Bounded Waiting.

c) this solution satisfy all conditions for CS.

d) this solution is satisfy progress condition.

My professor say (c) is right. but i think (a), (b), (c), (d) is correct for this question. anyone could help me.

  • You probably mean 1-i. –  Oct 11 '14 at 08:14
  • i know, Dear @YvesDaoust, but in this question i means (a) to (d) is false. but my professor says (c) is the answer of this questions. –  Oct 11 '14 at 08:16
  • Dear @YvesDaoust, (a), and (d) is also not satisfied. –  Oct 11 '14 at 08:19
  • Saying that (c) is false is an ambiguous statement. Can mean none of a, b, c is true or at least one of them is false. –  Oct 11 '14 at 08:20
  • Dear @YvesDaoust, would you please continue discussion in chat? –  Oct 11 '14 at 08:24
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/62869/discussion-between-yves-daoust-and-mio-mio). –  Oct 11 '14 at 08:25

1 Answers1

0

(a) is false: if both processes invoke Wait, they will set the other's flag to false and be able to cross the loop.

But then (c) is false as well.