Almost every computer is control flow. That is, they perform operations when satisfy the instruction criterion. The instruction criterion is the program counter. When the program counter is equal to the address of a particular instruction, it is executed. Therefore, a control flow processor goes in order.

Data flow computers execute operations when they satisfy the data criterion. When the operands to the instruction become available (doesn't depend on anything), the instruction is executed. Data flow computers, therefore, don't go in order.

For example, we have a program with three variables X, Y, and Z:

  • X= 1
  • Y= 2
  • Z= 3
  • Y= Z + X
  • X= Z + 3

The control flow processor executes them in that order. However, the data flow processor may execute instructions 1, 2, and 3 at once. It doesn't necessarily have to, but they are all queued for execution at once (the constant is always available). It then can execute instruction 5. Then it can execute instruction 4.

Many modern processors implement a sort of "bounded dataflow" approach which results in out of order execution. This allows the processor to maintain a control flow execution model, but actually determine which instructions in its instruction buffer can be executed in parallel.

Log in or registerto write something here or to contact authors.