Effective Data Exchange in Parallel Computing

Hui Ma, Yongqi Li · 2013

How to efficiently transfer data among parallel threads is a research hotspot. A common data structure of transferring data among parallel threads is queue. Some writer threads write data into one side of the queue, and reader threads read data from the other side of the queue. Running in parallel environments, some sources, such as shared variables, are critical resources, which require atomic operation. One naive way to guarantee the correctness is to impose a lock on critical resources. However, lock is a heavy system mechanism, and is of low efficiency. In this paper, a highly effective single-in-single-out lock-free queue is devised by utilizing some important hardware properties and techniques, such as thread-local variables, fast modulo operations and cache-line padding, etc. A single-in-multi-out lock-free queue and a multi-in-multi-out lock-free queue are also proposed. Experimental results in the end show the effectiveness of our methods.

Read the paper · More papers on PaperTik