Skip to content

pipe implementations

Nelson Tavares de Sousa edited this page Nov 30, 2014 · 1 revision

Pipe Implementations

We provide several implementations of a pipe to enable you building an analysis that is correct w.r.t. concurrency issues and as fast as possible. Although you won't come in contact with these technical interna due to our pipe factory abstraction, we nevertheless describe them for all interested readers. In the following, you find a table containing the characteristics of each available implementation.

Available Pipe Implementations

Implementation Intra/inter Unbuffered/fixed-buffered/growable-buffered Ordered/unordered
SingleElementPipe intra unbuffered ordered
OrderedGrowableArrayPipe intra growable ordered
SpScPipe inter fixed-buffered ordered
... ... ... ...

We provide the pipe implementations SingleElementPipe and OrderedGrowableArrayPipe to connect two stages executed within the same thread. The former allows to hold only one single element, while the latter can hold an arbitrary number of elements. While the former is faster than the latter, the latter can buffer more than one element.

We provide the pipe implementation SpScPipe to connect two stages executed within two different threads. Although this implementation is slower than the unsynchronized versions above, it utilizes the latest insights of inter-thread synchronization and thus reduces the overhead to a minimum. For example, this implementation is lock-free, cache-aware, and reading an element does not cost any synchronization overhead on x86 processor architectures.

Intra-Thread Pipe vs. Inter-Thread Pipe

TODO

Unbuffered vs. Fixed/Growable Buffered Pipe

TODO

Ordered vs. Unordered Pipe

TODO

Clone this wiki locally