Shared Memory Implementation of the Gamma-Operation. - Gladitz, Katia
The Gamma scheme allows the specification of an application without introducing unnecessary sequentiality. The main idea is to simulate a chemical reaction on multisets, also called bags. Some elements of a bag which fulfil a certain predicate (also called reaction condition) may be taken from the multiset and replaced by new elements which are generated by combining the selected elements using the so-called reaction function. In the present paper, we investigate the efficient parallel implementation of the Gamma scheme. In particular, the reaction condition can be split into parts which are tested as early as possible. Possible atomic conditions are arithmetic comparisons. We use the properties of the arithmetic comparisons in order to restrict the range of bag elements which has to be considered. Reconsiderations of the same bag elements are avoided. Moreover, a sophisticated protocol is needed in order to avoid deadlocks when several processes compete for the same bag elements. Experimental results show the impact of our improvements.