Previous | Next --- Slide 41 of 43
Back to Lecture Thumbnails

What other methods are there of implementing barriers? Would it be possible to do something like the message passing we did for the grid solver to get the rows we needed?


I think its also possible to implement barriers using semaphores.


There are multiple ways to implement barriers using synchronization primitives:

  • Linear Barrier
  • Tree Barrier
  • Send Receive Barrier
  • Butterfly barrier
  • This slid-deck has some brief information on each type of barrier


    @rajul thanks for that. This was the kind of thing I was looking for.


    Note that this improved method is only beneficial on an interconnect that allows multiple threads to communicate at the same time. Otherwise, the barrier will be serialized, and will effectively take just as long.