A light-weight parallel execution layer for shared-memory stream processing
Daniel Prokesch · reposiTUm (TU Wien) · 2011
In recent years, multicore technology became prevalent in the area of general-purpose computing.In order to facilitate the benefits of the steadily increasing number of cores, programming paradigms are necessary that support or even enable the derivation of concurrency.S-Net is a declarative coordination language which aims to separate the concerns of computation and organisation of concurrent execution by defining the coordination behaviour of networks of asynchronous, stateless components (called boxes) and their orderly interconnection via typed streams.Boxes are written in any conventional language, connected to the streaming network with a single input and a single output stream.Streaming networks are expressed in S-Net itself as algebraic formulae built out of four network combinators, namely serial and parallel composition, and serial and parallel replication.The aim of this thesis is to extend the multi-threaded S-Net runtime system to fulfil two requirements.First, to enable the collection of monitoring information such as execution time of components, or buffer usage along communication paths.Second, to provide a way to control scheduling of components.By analysing existing stream-processing frameworks with respect to their runtime system implementations, concepts for a new execution layer were devised.A Light-weight Parallel Execution Layer (LPEL) has been developed, which manages tasks communicating via unidirectional singleproducer single-consumer buffered streams in user-space, with special focus on the requirements imposed by the S-Net model.State-of-theart techniques, like concurrent data structures and lock-free algorithms, have been employed.As a proof of concept, the layer is implemented as a separate library in the C programming language, and S-Net is ported onto it.Experiments with the new layer show efficient resource utilisation when having to handle many components.The profiling information can be used to calculate computational costs of components as well as to derive application-specific scheduling and placement strategies.