# Is bounded waiting satisfied in this 2 process solution?

Two processes, P1 and P2, need to access a critical section of code. Consider the following synchronization construct used by the processes:

/*  P1   */
while (true) {
wants1 = true;
while (wants2 == true);
/* Critical Section */
wants1 = false;
}
/* Remainder section */

/*  P2   */
while (true) {
wants2 = true;
while (wants1 == true);
/* Critical Section */
wants2=false;
}
/* Remainder section */


Here, wants1 and wants2 are shared variables, which are initialized to false.

What i have tried =>

Here, mutual exclusion is satisfied and deadlock is there, so no progress .

I am only having a doubt that bounded waiting can also be satisfied here as according to the definition, bound is here 0, so waiting is bounded here ?

Is my understanding correct ?

Bounded waiting is satisfied, the process $p_i$ will never be bypassed by $p_{1-i}$ after changing the value of $w_i$ (wants $i$) to $1$.
If $p_i$ set the value of $w_i$ to $1$, then in order to enter the critical section, $p_{1-i}$ must pass the while loop. This cannot happen until the value of $w_i$ is set to 0. The only place where $w_i$ is set to $0$, is after $p_i$ has finished, which means he will never be bypassed by $p_{1-i}$.
When in doubt, try to prove it yourself. If you agree that the number of times a process may be bypassed is at most $0$, then yes, bounded waiting holds.