encyclopegia.org

Data dependency

A data dependency in computer science is a situation in which a program statement (instruction) refers to the data of a preceding statement. In compiler theory, the technique used to discover data dependencies among statements (or instructions) is called dependence analysis.

A data dependency in computer science is a situation in which a program statement (instruction) refers to the data of a preceding statement. In compiler theory, the technique used to discover data dependencies among statements (or instructions) is called dependence analysis. 1. A = 3 2. B = A 3. C = B Instruction 3 is truly dependent on instruction 2, as the final value of C depends on the instruction updating B. Instruction 2 is truly dependent on instruction 1, as the final value of B depends on the instruction updating A. Since instruction 3 is truly dependent upon instruction 2 and instruction 2 is truly dependent on instruction 1, instruction 3 is also truly dependent on instruction 1. Instruction level parallelism is therefore not an option in this example. 1. B = 3 2. A = B + 1 3. B = 7 Example: MUL R3,R1,R2 ADD R2,R5,R6 It is clear that there is anti-dependence between these 2 instructions. At first we read R2 then in second instruction we are Writing a new value for it. An anti-dependency is an example of a name dependency. That is, renaming of variables could remove the dependency, as in the next example: 1. B = 3 N. B2 = B 2. A = B2 + 1 3. B = 7 A new variable, B2, has been declared as a copy of B in a new instruction, instruction N. The anti-dependency between 2 and 3 has been removed, meaning that these instructions may now be executed in parallel. Note that there is still a read-after-write dependency: instruction 2 is truly dependent on instruction N, which is truly dependent upon instruction 1. This dependency existed in the original version, where instruction 2 was truly dependent on instruction 1. This dependency cannot be safely removed. 1. B = 3 2. A = B + 1 3. B = 7 As with anti-dependencies, output dependencies are name dependencies. That is, they may be removed through renaming of variables, as in the below modification of the above example: 1. B2 = 3 2. A = B2 + 1 3. B = 7 ==Implications== Conventional programs are written assuming the sequential execution model. Under this model, instructions execute one after the other, atomically (i.e., at any given point in time, only one instruction is executed) and in the order specified by the program. However, dependencies among statements or instructions may hinder parallelism — parallel execution of multiple instructions, either by a parallelizing compiler or by a processor exploiting instruction-level parallelism. Recklessly executing multiple instructions without considering related dependences may cause danger of getting wrong results, namely hazards. ==Relevance in computing== Data dependencies are relevant in various areas of computing, particularly in processor design, compiler construction, parallel computing, and concurrent programming. ==See also== Dependency analysis Control dependency Loop dependence analysis § Data dependence Hazard (computer architecture) § Data hazards ==References==

References

  1. Analysis of Programs for Parallel Processing · retrieved 2026-11-21 · rev 1310777676
    Cite this reference

    MLA "Analysis of Programs for Parallel Processing." Bernstein, Arthur J. 2026-11-21. https://en.wikipedia.org/wiki/Doi_(identifier). Accessed 24 November 2026.

    Chicago "Analysis of Programs for Parallel Processing." Bernstein, Arthur J. 2026-11-21. https://en.wikipedia.org/wiki/Doi_(identifier).

    APA Bernstein, Arthur J. (2026). Analysis of Programs for Parallel Processing. Retrieved November 24, 2026, from https://en.wikipedia.org/wiki/Doi_(identifier)

  2. a b John L. Hennessy ; David A. Patterson (2003). Computer Architecture: a quantitative approach (3rd ed.) . Morgan Kaufmann . ISBN 1-55860-724-2 . {{ cite book }} : CS1 maint: multiple names: authors list ( link ) Wikipedia revision 1310777676, retrieved 2026-11-22 · retrieved 2026-11-21 · rev 1310777676
    Cite this reference

    MLA "a b John L. Hennessy ; David A. Patterson (2003). Computer Architecture: a quantitative approach (3rd ed.) . Morgan Kaufmann . ISBN 1-55860-724-2 . {{ cite book }} : CS1 maint: multiple names: authors list ( link ) Wikipedia revision 1310777676, retrieved 2026-11-22." a b John L. 2026-11-21. https://en.wikipedia.org/wiki/John_L._Hennessy. Accessed 24 November 2026.

    Chicago "a b John L. Hennessy ; David A. Patterson (2003). Computer Architecture: a quantitative approach (3rd ed.) . Morgan Kaufmann . ISBN 1-55860-724-2 . {{ cite book }} : CS1 maint: multiple names: authors list ( link ) Wikipedia revision 1310777676, retrieved 2026-11-22." a b John L. 2026-11-21. https://en.wikipedia.org/wiki/John_L._Hennessy.

    APA a b John L. (2026). a b John L. Hennessy ; David A. Patterson (2003). Computer Architecture: a quantitative approach (3rd ed.) . Morgan Kaufmann . ISBN 1-55860-724-2 . {{ cite book }} : CS1 maint: multiple names: authors list ( link ) Wikipedia revision 1310777676, retrieved 2026-11-22. Retrieved November 24, 2026, from https://en.wikipedia.org/wiki/John_L._Hennessy

Cite this article

MLA

"Data dependency." encyclopegia.org, 2025, https://encyclopegia.org/wiki/data-dependency. Accessed 24 November 2026.

Chicago

"Data dependency." encyclopegia.org. Accessed November 24, 2026. https://encyclopegia.org/wiki/data-dependency.

APA

encyclopegia.org. (2025). Data dependency. Retrieved November 24, 2026, from https://encyclopegia.org/wiki/data-dependency

Accessed November 24, 2026 · CC BY-SA 4.0 · citation page · JSON

Related articles

Programmed learning

enwiki · references available

Akidolestes

enwiki · references available

Josh Hannay

enwiki · references available

Borçka

enwiki · references available

Operation Prone

enwiki · references available

Menemen

enwiki · references available

Ahırlı

enwiki · references available

County Route 555 (New Jersey)

enwiki · references available

List of nursing schools in the United States

enwiki · references available

Calasparra

enwiki · references available

Juršinci

enwiki · references available

Weldon B. Heyburn

enwiki · references available
CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1310777676 · 0.5 · snapshot enwiki-001310777676

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.