Concurrent design patterns for resource sharing
Bo I. Sandén · 1997
A concurrent design parrem is a small grouping of task and protected units rhar is usefil in many applications.This paper concentrates on NO widely used patterns for resource control in concurrent programming: the Assembly Line and the Shared Resource.In the Assembly Line, each resource has a task #iat handles one request at a time, then sends it on to the nert resource-task In the Shared Resource, the resource is implemented by means of a protected unit, which is called by requesters implemented as tasks, A dual@ exists in that either pattern can often be used in a given problem.In sifuafions where access to resources sets the pace for the problem.the Assembly Line seems to lead to simpler sohuions.lXe shared-resource pattern is preferabie when the extent in time of exclusive access is short and rhe resource is nof a bottleneck The partems are used with the en@y-lif modeling design approach (ELM) for concurrent software.Other patterns used with ELM include a periodic pattern and a stare-machine partem. * I. InntroductionTo study software design is to look at programs at a certain level of abstraction and disregard accidental implementations details.More than any traditional design approach, the design pattern concept has encouraged programmers to take a step back from the "cocle" and observe their designs at such an abstract level.Traditionally, design has been closely associated with step-wise methods.These are usually intended for novices and often regarded with some contempt by accomplished programmers who refuse to have a "clerical" method imposed on the creative design process.Unfortunately, this has often led to the conclusion that "real" programmers should not deal with design at all.Like patterns, the enrify-life modeling (ELM) design approach for concurrent software is a means for experienced designers to reason about designs without imposing a particular process.ELM is concerned with the relationship between the software design and the problem at hand.It encourages restrictive use of concurrency where each task in the software is justified by concurrency (or asynchrony) inherent in the problem. pc&&nto & di&Lhud copies of all orpti Of this work fir poaat or cl-m use is Bylted without fee provided tit copies are not made or diibuted for profit or commercid advultage.the ~Pyright n&c, the tile ofthe public&on ad its date qpe~, and notice is given that copying is by permission of AChl, IIIC.TO COPY Otherwise, to republish, to post on servers, or to redistribute to Iii requires prior specitic permission andror a fee.