A Speculative Mechanism for Barrier Synchronization

Jinglei Meng,Tianzhou Chen,Ping Pan,Jun Yao,Minghui Wu
DOI: https://doi.org/10.1109/HPCC.2014.148
2014-01-01
Abstract:Barrier are synchronization operations widely used by compiler and programmer, it is flexible and convenient but there are some defects. Threads arrive at barrier ahead of other threads have to wait the subsequent threads. This lead to some waste of time. Our experiments show that up to 35% of the total execution time is wasted on synchronization. Inspired by this, we propose barrier speculation which allows faster threads running speculatively with its own temporary data instead of waiting at barrier for synchronization. To control the max number barriers that threads can speculatively pass through, we also propose two risk control strategies: waiting in place risk control strategy and roll back re-speculate risk control strategy. Our evaluation results show that our barrier speculation together with two risk control strategies can achieve 5.7% and 6.3% overall program execution time reduction on average respectively when compared with conventional synchronization.
What problem does this paper attempt to address?