Option B:
The barrier implementation may lead to a deadlock if two barrier in invocations are used in immediate succession
isn't that mean :
barrier();
barrier();
Let there are n processes namely 1 to n.
All processes are out from while (process_arrived !=n) of first barrier. --> process_arrived = n
1 to n-1 are entered second barrier after completion of first barrier. --> process_left = n-1 and process_arrived may be n + 1 or n+2 or ....... n+(n-1) but not n
Therefore Now all those are struck at while(process_arrived !=n);
Meanwhile, process $P_n$ take charge of semaphore and made process_left = n and process_arrived = 0.
Now entered into the 2nd barrier, made process_arrived =1 and struck at while(process_arrived !=n); with other processes.