Content deleted Content added
m Open access bot: hdl updated in citation with #oabot. |
→Barriers: | Altered template type. Add: isbn, pages, date, title, chapter, authors 1-5. Changed bare reference to CS1/2. | Use this tool. Report bugs. | #UCB_Gadget |
||
Line 72:
Barriers are simple to implement and provide good responsiveness. They are based on the concept of implementing wait cycles to provide synchronization. Consider three threads running simultaneously, starting from barrier 1. After time t, thread1 reaches barrier 2 but it still has to wait for thread 2 and 3 to reach barrier2 as it does not have the correct data. Once all the threads reach barrier 2 they all start again. After time t, thread 1 reaches barrier3 but it will have to wait for threads 2 and 3 and the correct data again.
Thus, in barrier synchronization of multiple threads there will always be a few threads that will end up waiting for other threads as in the above example thread 1 keeps waiting for thread 2 and 3. This results in severe degradation of the process performance.<ref name=":0">{{
The barrier synchronization wait function for i<sup>th</sup> thread can be represented as:
|