##### Interested variable

Process P0:- Process P1

while(1) while(1)

{ {

int[0]=True; int[1]=True;

while(int[1]==True); while(int[0]=True);

//CS// //CS//

int[0]=False; int[1]=False;

} }

Initially, int[0]=int[1]=false;

Will this algorithm satisfy bounded wait? According to me it should not

There is a chance of deadlock

say if p0 wants to enter cs by making the intrest [0]=t and after that it got preempted .Then P1 comes for execution ,same goes for p1 intrest[1]=t and got prempted and then again P0 got chance he checks in while loop P1 is intrested too so he got stuck . same goes for P1 ,P1 checks in while loop P0 is intrested too so p1 too got stuck resuts in the deadlock

So if a system is in deadlock then how can we say this algorithm is ensuring bounded waiting or Progress . I think this algo violates both the Progress as well as Bounded Waiting , cause deadlock is more severer than Bounded waiting ,also hampering the progress beacuase of these deadlock none of the process is allowed to enter CS

yaaa thats why I guess peaterson came up with a solution.

ya thats fine , as there is a deadlock in the system so peterson came up with its solution , But my question is does this beacause of progress and bounded waiting is ensured