\section{Conclusion}

We have discussed how signal/image processing
programs written in the Sisal functional programming language
can be transformed and mapped onto multiprocessor
computers. Our approach to program analysis and mapping involves
the following steps:

\begin{enumerate}

\item
Transform the program into an acyclic graph of stream-processing
program modules

\item
Determine relative computation rates and load parameters for
each program module.

\item
Choose plausible mapping plans

\item
Determine performance characteristics for each mapping plan and
select the best for the user's objective.

\item
Construct the machine code.

\end{enumerate}

We have discussed application of the method to an optical
surveillance problem, and discussed program mapping plans
suitable for two target multiprocessor architectures: a
multiprocessor built of conventional processing elements
and a hypothetical multiprocessor built of multithreaded
processing elements. We suggest that, by offering lower
scheduling and synchronization costs, the multithreaded
architecture has the ability to support efficient fine-grain
computation, leading to lower end-to-end latency and
decreased memory requirement for intermediate data for the
studied application. Another architectural variant that offers
an intermediate choice for multiprocessing between conventional processors and
the MTA machine discussed here is the {\em threaded abstract
machine} \cite{CullerEtAl91}.

In the computation studied in this paper, there is plenty of
parallelism to be exploited. Hence there would be no benefit
to increase processing element cost by adding features designed
only to increase single-thread performance.

Writing a program as a collection of stream processing functions
permits easy characterization of the modules and exploration of
a variety of choices for mapping the modules onto a parallel
processing computer. Other work relating to static mapping of programs
for multiprocessor
execution includes many published results on resource
management for real-time computation. A summary of work in that
area appears in \cite{ChaudharyAgg93}. Others have also
noted the tradeoff between throughput and latency. The work presented here
is distinctive in relating the mapping problem to program
structure characteristic within a functional programming
framework, and in dealing with multi-rate signal processing problems.
The work closest in spirit to ours is the Ptolemy Project of
Prof. Lee at Berkeley.

Our work indicates that the combination of functional programming
with multithreaded processing elements can lead to significantly easier
programming of applications in the domains of signal/image processing.
Similar results are anticipated for other application areas that
can benefit from use of stream data types, such as real-time embedded
systems and certain industrial process control problems. For applications
that require dynamic management of resources during program execution,
further development of methods of scheduling and load balancing are
needed together with architectural features that permit their efficient
implementation. We look forward to further developments in this
exciting area.
