1,097 views

1 Answer

1 votes
1 votes

Answer:

  • If a system has only two processes, then the use of a barrier is not wise. A single semaphore is more than enough in this case.

  • On the other hand, if the program works in phases and none of the processes enters the next phase unless both get finished with the current phase. In this case, a barrier can be used more productively.

Related questions