posted on 2013-02-28, 12:56authored byJimmy Cleary, Owen Callanan, Mark Purcell, David Gregg
For most multi-threaded applications, data structures must be shared between threads. Ensuring thread safety on these data structures incurs overhead in the form of locking and other synchronization mechanisms. Where data is shared among multiple threads these costs are unavoidable. However, a common access pattern is that data is accessed primarily by one dominant thread, and only very rarely by the other, non-dominant threads. Previous research has proposed biased locks, which are optimized for a single
dominant thread, at the cost of greater overheads for non-dominant threads. In this paper we propose a new family of biased synchronization mechanisms that, using a modified interface, push accesses to shared data from the non-dominant threads to the dominant one, via a novel set of message passing mechanisms. We present mechanisms for protecting critical sections, for queueing work, for caching shared data in registers where it is safe to do so, and for asynchronous critical section accesses. We present results
for the conventional Intel ®Sandy Bridge processor and for the emerging network-optimized many-core IBM ® PowerENTMprocessor. We find that our algorithms compete well with existing biased locking algorithms, and, in particular, perform better than existing algorithms as accesses from non-dominant threads increase.
History
Publication
ACM Transactions on Architecture and Code Optimization;9(4), article no 27