Data dependency

from Wikipedia, the free encyclopedia

Data dependency ( data dependency in) describes computer science , the situation that data which are used by an instruction, also be used by a previous instruction.

A distinction is made between the following types of data dependencies:

  • Real data dependency ( true dependence , read-after-write ) exists when an instruction has read access to the result of a preceding instruction. Example:
    1. a = b + c
    2. d = a + 1
  • Counter-dependence ( anti-dependence , write-after-read ) exists when an instruction (over-) writes a value that is read from the previous instruction. Example:
    1. a = b + c
    2. b = d + 1
  • Output dependence ( output dependence , write-after-write ) is when both instructions write to the same variable. Example:
    1. a = b + c
    2. a = d + e

Data dependencies are not a problem when, as in conventional programs, one instruction after the other is executed. However, in pipelined processors that execute several instructions in parallel, they can lead to data conflicts .

Individual evidence

  1. a b c John L. Hennessy ; David A. Patterson : Computer Architecture: a quantitative approach (3rd ed.) . Morgan Kaufmann, 2003, ISBN 1-55860-724-2 .