Coarse-Grained Parallelism Using Metaobject Protocols
Abstract
Currently, there exist different approaches to parallelizing a
computation at a coarse-grain. One approach is to parallelize a
computation by placing compiler declarations in the source code. This
approach makes it possible to conceptually separate the code
describing a computation from the code (i.e. declarations) describing
its parallelization. This approach also makes it possible to
explicitly control a computation's parallelization, thereby providing
an opportunity to increase the computation's performance. However,
there are cases when it is not reasonable to expect a desired
mechanism for concurrency to be supported by the available, and fixed
set of declarations, such as when the desired mechanism is highly
specialized to a given computation and target architecture. In these
cases, the declaration-based approach fails. In this thesis, we
demonstrate that mops can solve this problem. Under the
metaobject protocol approach, a computation is parallelized by
marking source code expressions with marks supported by the
compiler. Marks, like declarations, are used to separate a
computation from its parallelization. When the supported marks can
not be used to express a desired mechanism for concurrency, the
metaobject protocol is used to incrementally augment the compiler's
parallelization strategy to support the desired mechanism. The
metaobject protocol is a model of the compiler's parallelization
strategy that provides the knowledge necessary to augment the strategy
incrementally, without exposing arbitrary or irrelevant implementation
details. In order to demonstrate the effectiveness of the metaobject
protocol-based approach, we present Anibus, a metaobject
protocol-based compiler. We give several examples of using marks, and
of incrementally augmenting Anibus's parallelization strategy. The
examples include two implementations of the n-body gravity problem.
Go to Selected Papers page.