Sie sind auf Seite 1von 2

Program Flow Mechanisms

Conventional machines used control flow

CSCI 8150 mechanism in which order of program execution
explicitly stated in user programs.
Advanced Computer Architecture Dataflow machines which instructions can be
executed by determining operand availability.
Reduction machines trigger an instruction’s
Hwang, Chapter 2 execution based on the demand for its results.
Program and Network Properties
2.3 Program Flow Mechanisms

Control Flow vs. Data Flow Data Flow Features

Control flow machines used shared memory for instructions No need for
and data. Since variables are updated by many instructions,
shared memory
there may be side effects on other instructions. These side
program counter
effects frequently prevent parallel processing. Single
processor systems are inherently sequential. control sequencer
Instructions in dataflow machines are unordered and can Special mechanisms are required to
be executed as soon as their operands are available; data is detect data availability
held in the instructions themselves. Data tokens are match data tokens with instructions needing them
passed from an instruction to its dependents to trigger
enable chain reaction of asynchronous instruction

A Dataflow Architecture - 1 A Dataflow Architecture - 2

The Arvind machine (MIT) has N PEs and an N -by -N Instruction address(es) effectively replace the
interconnection network.
program counter in a control flow machine.
Each PE has a token-matching mechanism that dispatches
only instructions with data tokens available. Context identifier effectively replaces the frame
Each datum is tagged with base register in a control flow machine.
address of instruction to which it belongs
Since the dataflow machine matches the data tags
context in which the instruction is being executed
Tagged tokens enter PE through local path (pipelined), and from one instruction with successors, synchronized
can also be communicated to other PEs through the routing instruction execution is implicit.

A Dataflow Architecture - 3 Demand-Driven Mechanisms
An I-structure in each PE is provided to eliminate Data-driven machines select instructions for execution
excessive copying of data structures. based on the availability of their operands; this is
essentially a bottom-up approach.
Each word of the I-structure has a two-bit tag Demand-driven machines take a top-down approach,
indicating whether the value is empty, full, or has attempting to execute the instruction (a demander ) that
pending read requests. yields the final result. This triggers the execution of
This is a retreat from the pure dataflow approach. instructions that yield its operands, and so forth.
The demand-driven approach matches naturally with
Example 2.6 shows a control flow and dataflow
functional programming languages (e.g. LISP and
comparison. SCHEME).
Special compiler technology needed for dataflow

Reduction Machine Models Summary

String-reduction model: Control flow machines give complete control, but are less
each demander gets a separate copy of the expression string to efficient than other approaches.
evaluate Data flow (eager evaluation) machines have high potential
each reduction step has an operator and embedded reference to for parallelism and throughput and freedom from side
demand the corresponding operands effects, but have high control overhead, lose time waiting
each operator is suspended while arguments are evaluated for unneeded arguments, and difficulty in manipulating
Graph-reduction model: data structures.
expression graph reduced by evaluation of branches or subgraphs,
possibly in parallel, with demanders given pointers to results of Reduction (lazy evaluation) machines have high parallelism
reductions. potential, easy manipulation of data structures, and only
based on sharing of pointers to arguments; traversal and reversal of execute required instructions. But they do not share
pointers continues until constant arguments are encountered. objects with changing local state, and do require time to
propagate tokens.