Title
Hardware Synthesis of Weakly Consistent C Concurrency.
Abstract
Lock-free algorithms, in which threads synchronise not via coarse-grained mutual exclusion but via fine-grained atomic operations ('atomics'), have been shown empirically to be the fastest class of multi-threaded algorithms in the realm of conventional processors. This paper explores how these algorithms can be compiled from C to reconfigurable hardware via high-level synthesis (HLS). We focus on the scheduling problem, in which software instructions are assigned to hardware clock cycles. We first show that typical HLS scheduling constraints are insufficient to implement atomics, because they permit some instruction reorderings that, though sound in a single-threaded context, demonstrably cause erroneous results when synthesising multi-threaded programs. We then show that correct behaviour can be restored by imposing additional intra-thread constraints among the memory operations. We implement our approach in the open-source LegUp HLS framework, and provide both sequentially consistent (SC) and weakly consistent ('weak') atomics. Weak atomics necessitate fewer constraints than SC atomics, but suffice for many concurrent algorithms. We confirm, via automatic model-checking, that we correctly implement the semantics defined by the 2011 revision of the C standard. A case study on a circular buffer suggests that circuits synthesised from programs that use atomics can be 2.5x faster than those that use locks, and that weak atomics can yield a further 1.5x speedup.
Year
DOI
Venue
2017
10.1145/3020078.3021733
FPGA
Keywords
Field
DocType
atomic operations,C/C plus,FPGAs,high-level synthesis,lock-free algorithms,memory consistency models,scheduling
Job shop scheduling,Scheduling (computing),Non-blocking algorithm,Computer science,Concurrency,Parallel computing,High-level synthesis,Real-time computing,Mutual exclusion,Reconfigurable computing,Speedup
Conference
Citations 
PageRank 
References 
1
0.38
18
Authors
4
Name
Order
Citations
PageRank
Nadesh Ramanathan1193.84
Shane T. Fleming2286.57
John Wickerson3357.17
George A. Constantinides41391160.26