For all those thinking why option A is wrong, read the statement once again:
“each process in the set arrives at the barrier and waits for all others to arrive and then all processes leave the barrier.”
Now, For option 1, consider this case:
P1, P2, P3 are the processes.
First, All P1,P2, P3 executed till line no. 4.
So, process_arrived will be 3, and lets say P2 and P3 are preempted there, Only P1 proceeds execution. Now, According to option 1, process_arrived will be decremented, So, it becomes 2.
Now, Say P1 starts again (i.e. a new set), From line 1. Therefore, after line 2, it will make process_arrived again 3.
So, at line 4, the condition will be false (as process_arrived=3), and P1 can easily proceed execution, and enter critical section.
This voids the quoted line given in the question, as it does not wait for other processes in its set, (i.e. set no. 2)
So, Option a is wrong.