1
$\begingroup$

Consider this version of the algorithm, for only 2 processes, 0 and 1:

Initially flag[i]=false

1.    flag[i] := true
2.    while flag[1-i] do{
2.1.    if turn = 1-i then{
2.1.1.    flag[i] := false
2.1.2.    await turn=i
2.1.3.    flag[i] := true } }
3.    Critical Section
4.    turn := 1-i
5.    flag[i] := false

I believe this algorithm is starvation-free. But is it $k$-bounded-waiting for a specific $k$? or is it not $k$-bounded for any finite $k$?

$\endgroup$
  • $\begingroup$ also, consider a-synchronic system. $\endgroup$ – user80614 Nov 22 '17 at 17:51

Your Answer

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

Browse other questions tagged or ask your own question.