1,255 views

1 Answer

6 votes
6 votes

Peterson two process solution ::  bounded waiting:

  • Assume $P_1$ and $P_2$ tries to enter into critical section.
  • By above statement, it is implied that they have executed initial parts of the codes and initialized a couple of global flags .
  • Assume $P_1$ gets success and enters the critical section and $P_2$ waits in while loop.
  • After some time $P_1$ exits from the critical section.
  • Bounded waiting could be violated if $P_1$ again get a chance and if somehow it attempts again and successfully enter into critical section while $P_2$ still in waiting in while loop. But this can not happen because of a global flag named turn.

Related questions

0 votes
0 votes
3 answers
1
set2018 asked Sep 24, 2017
1,265 views
is bounded waiting satisfy or not?what if turn =other?