edited by
662 views

1 Answer

Best answer
3 votes
3 votes

Yes Progress is not guaranteed as well as bounded waiting  is also not guaranteed .

lets take a scenario . suppose process pi starts first so it sets its flag[i] =true and till than flag[j]=false

so there will not be infinite waiting and pi will enter in to its critical section . and preempted out .

now process pj start its execution now it sets flag[j]=true but here flag[i]=true so here pj will stuck in infinite while loop and will wait till flag[i]=false and preempted out

but here process pi exits from its critical section and made  flag[i]=false but as while(1) is there pi again comes for execution
and sets flag[i]=true but now flag[j] =false so it cannot enter into critical section . and will wait infinitely . and when got preempted out .

pj got chance but pj will again see the flag[i]=true so it will also stuck in infinte looping .

so now is the condition when both are waiting for critical section and no one in is critical section . so there is no progress . they are simply waiting . Deadlock is also here . Here no queue is maintain or here is no proper order of execution so no bounded waiting also .

selected by

Related questions

2 votes
2 votes
3 answers
1