5
Most read
9
Most read
11
Most read
Dependencies
Dependencies
DEPENDENCIES

o In this section we shall consider:
 Data Dependence.
 Control Dependence.
DATA DEPENDENCIES
A data dependency is a situation in which
a program statement (instruction) refers to the data
of a preceding statement.
TYPES OF DATA DEPENDENCIES
Three cases are exist…
 True Data Dependence (flow dependence –
read after write)
 Output Dependence (write after write)
 Anti Dependence (write after read)
TRUE DATA DEPENDENCY
 True data dependency is where one instruction depends
on the final outcome of a previous instruction.
 Also known as flow dependency or read after write
dependency
 Consider the code:
ADD r1,r2
(r1 =r1+r2;)
MOV r3,r1
(r3 = r1;)
 Can fetch and decode second instruction in parallel
with first
 Can NOT execute second instruction until first is
finished
CONTINUE . . .
MOV r1,[mem]
MOV r3,r1
MOV r2,5

(Load r1 from memory)
(r3 = r1;)
(r2 = 5;)

 The superscalar machine would execute the first and
third instructions in parallel, yet have to wait anyway for
the first instruction to finish before executing the second
 This holds up MULTIPLE pipelines
OUTPUT DEPENDENCY
This type of dependency occurs when two instructions both
write a result.
If an instruction depends on the intermediate result, problems
could occur
Also known as write-write dependency
R3 = R3 + R5;
(I1)
R4 = R3 + 1;
(I2)
R3 = R5 + 1;
(I3)
R7 = R3 + R4;
(I4)
I2 depends on result of I1 and I4 depends on result of I3 –
true data dependency
If I3 completes before I1, result from I1 will be written lost –
output (write-write) dependency
ANTIDEPENDENCY(WRITE AFTER READ)
 Called Antidependency because it is the exact opposite of
data dependency

 Data dependency: instruction 2 depends on data from
instruction 1
 Antidependency: instruction 1 depends on data that could
be destroyed by instruction 2
CONTROL DEPENDENCY
S1. if (a == b)
S2. a = a + b
S3. b = a + b
RESOURCE CONFLICT
 Two or more instructions requiring
access to the same resource at the same
time
-- e.g. functional units, registers, bus
 Similar to true data dependency, but it is
possible to duplicate resources
COMPARISON OF TRUE DATA, PROCEDURAL,
AND RESOURCE CONFLICT DEPENDENCIES

More Related Content

PPT
advanced computer architesture-conditions of parallelism
PPTX
File system structure
PPT
Type Checking(Compiler Design) #ShareThisIfYouLike
PPTX
Specification-of-tokens
PPTX
AI: Logic in AI
PPTX
Distributed DBMS - Unit 8 - Distributed Transaction Management & Concurrency ...
PPTX
Distributed database management system
PPTX
Reduction & Handle Pruning
advanced computer architesture-conditions of parallelism
File system structure
Type Checking(Compiler Design) #ShareThisIfYouLike
Specification-of-tokens
AI: Logic in AI
Distributed DBMS - Unit 8 - Distributed Transaction Management & Concurrency ...
Distributed database management system
Reduction & Handle Pruning

What's hot (20)

PPT
Operating system services 9
PPTX
Input-Buffering
PPTX
Propositional logic
PPTX
Code Optimization
PDF
Code optimization in compiler design
PPT
Thrashing allocation frames.43
PPTX
Structure of the page table
PPT
12. Indexing and Hashing in DBMS
PPTX
Introduction TO Finite Automata
PPTX
Resolution method in AI.pptx
PPTX
Semantic net in AI
PPSX
Functional dependency
PPTX
search strategies in artificial intelligence
PPTX
Principle source of optimazation
PPTX
Partial redundancy elimination
PPTX
Concurrency Control in Distributed Database.
PPTX
Principal source of optimization in compiler design
PPTX
A Role of Lexical Analyzer
PPTX
Algorithm Design Technique
PPT
chapter5-file system implementation.ppt
Operating system services 9
Input-Buffering
Propositional logic
Code Optimization
Code optimization in compiler design
Thrashing allocation frames.43
Structure of the page table
12. Indexing and Hashing in DBMS
Introduction TO Finite Automata
Resolution method in AI.pptx
Semantic net in AI
Functional dependency
search strategies in artificial intelligence
Principle source of optimazation
Partial redundancy elimination
Concurrency Control in Distributed Database.
Principal source of optimization in compiler design
A Role of Lexical Analyzer
Algorithm Design Technique
chapter5-file system implementation.ppt
Ad

Viewers also liked (18)

PPT
1.prallelism
DOCX
Resource dependency
PDF
Dependencies, dependencies, dependencies
PPTX
Input output
PPTX
Business
PPTX
what is computer......?
PPT
Causality in special relativity
PPTX
Computer_Architecture_O_ECEG-3163_01_Introduction (1)
PPTX
Introduction to computer architecture and organization
PPTX
Micro operation control of processor
PPTX
Writting process
PPTX
Dram and its types
PPTX
Multi core processor
PPT
Lecture 3
PPT
0 introduction to computer architecture
PPTX
Computer Architecture – An Introduction
PPT
Lec2 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- ILP
PPT
Computer architecture
1.prallelism
Resource dependency
Dependencies, dependencies, dependencies
Input output
Business
what is computer......?
Causality in special relativity
Computer_Architecture_O_ECEG-3163_01_Introduction (1)
Introduction to computer architecture and organization
Micro operation control of processor
Writting process
Dram and its types
Multi core processor
Lecture 3
0 introduction to computer architecture
Computer Architecture – An Introduction
Lec2 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- ILP
Computer architecture
Ad

Similar to Dependencies (20)

DOCX
parallelism
PDF
DBMS NOTES BY KAVYA R-UNIT4-2025-SIT.pdf
PPTX
Instruction Level Parallelism – Compiler Techniques
PPT
instruction parallelism .ppt
PDF
Pipeline and data hazard
PDF
Hazards in pipeline
PPT
module2.ppt
PPT
High Performance Computer Architecture
PPT
Unit 2 contd. and( unit 3 voice over ppt)
PDF
Program and Network Properties
PPT
DIRA: Automatic Detection, Identification, and Repair of Controll-Hijacking a...
PPTX
Data Hazards and its Handling Methods.pptx
PPTX
Parallel programming model
PPTX
Pipelining Hazards important points .pptx
PPT
hazard new.ppt
PPT
CALecture3Module1.ppt
PPT
computer architecture module3 notes module
PPTX
Registers in coa
PPTX
PP DBMS - 2 (1) (1).pptx
PDF
Oracle services on rac
parallelism
DBMS NOTES BY KAVYA R-UNIT4-2025-SIT.pdf
Instruction Level Parallelism – Compiler Techniques
instruction parallelism .ppt
Pipeline and data hazard
Hazards in pipeline
module2.ppt
High Performance Computer Architecture
Unit 2 contd. and( unit 3 voice over ppt)
Program and Network Properties
DIRA: Automatic Detection, Identification, and Repair of Controll-Hijacking a...
Data Hazards and its Handling Methods.pptx
Parallel programming model
Pipelining Hazards important points .pptx
hazard new.ppt
CALecture3Module1.ppt
computer architecture module3 notes module
Registers in coa
PP DBMS - 2 (1) (1).pptx
Oracle services on rac

More from Muhammad Ishaq (17)

PPT
Business proposal
PPT
Artificial neural network model & hidden layers in multilayer artificial neur...
PPTX
Artificial Neural Network
PPTX
PPTX
Brochures
PPTX
Computer architecture overview
PPTX
Raid 1 3
PPT
Multi processing
PPT
Cache memory
PPT
Cache memory
PPTX
Addressing
PPTX
Clusters
PPTX
Raid level 4
PPT
Bus interconnection
PPTX
Processor structure and funtions
PPTX
Superscalar & superpipeline processor
PPT
Input output module
Business proposal
Artificial neural network model & hidden layers in multilayer artificial neur...
Artificial Neural Network
Brochures
Computer architecture overview
Raid 1 3
Multi processing
Cache memory
Cache memory
Addressing
Clusters
Raid level 4
Bus interconnection
Processor structure and funtions
Superscalar & superpipeline processor
Input output module

Recently uploaded (20)

PPTX
UNIT_2-__LIPIDS[1].pptx.................
PPTX
2025 High Blood Pressure Guideline Slide Set.pptx
PPTX
Thinking Routines and Learning Engagements.pptx
PDF
FYJC - Chemistry textbook - standard 11.
PDF
Review of Related Literature & Studies.pdf
PPTX
PLASMA AND ITS CONSTITUENTS 123.pptx
PPTX
Key-Features-of-the-SHS-Program-v4-Slides (3) PPT2.pptx
PPTX
Diploma pharmaceutics notes..helps diploma students
PDF
Laparoscopic Imaging Systems at World Laparoscopy Hospital
PPTX
Unit 1 aayurveda and nutrition presentation
PDF
0520_Scheme_of_Work_(for_examination_from_2021).pdf
PDF
anganwadi services for the b.sc nursing and GNM
PDF
CHALLENGES FACED BY TEACHERS WHEN TEACHING LEARNERS WITH DEVELOPMENTAL DISABI...
PDF
Chevening Scholarship Application and Interview Preparation Guide
PDF
Horaris_Grups_25-26_Definitiu_15_07_25.pdf
PDF
Health aspects of bilberry: A review on its general benefits
PPTX
MMW-CHAPTER-1-final.pptx major Elementary Education
PPTX
Q2 Week 1.pptx Lesson on Kahalagahan ng Pamilya sa Edukasyon
PDF
Fun with Grammar (Communicative Activities for the Azar Grammar Series)
PDF
The TKT Course. Modules 1, 2, 3.for self study
UNIT_2-__LIPIDS[1].pptx.................
2025 High Blood Pressure Guideline Slide Set.pptx
Thinking Routines and Learning Engagements.pptx
FYJC - Chemistry textbook - standard 11.
Review of Related Literature & Studies.pdf
PLASMA AND ITS CONSTITUENTS 123.pptx
Key-Features-of-the-SHS-Program-v4-Slides (3) PPT2.pptx
Diploma pharmaceutics notes..helps diploma students
Laparoscopic Imaging Systems at World Laparoscopy Hospital
Unit 1 aayurveda and nutrition presentation
0520_Scheme_of_Work_(for_examination_from_2021).pdf
anganwadi services for the b.sc nursing and GNM
CHALLENGES FACED BY TEACHERS WHEN TEACHING LEARNERS WITH DEVELOPMENTAL DISABI...
Chevening Scholarship Application and Interview Preparation Guide
Horaris_Grups_25-26_Definitiu_15_07_25.pdf
Health aspects of bilberry: A review on its general benefits
MMW-CHAPTER-1-final.pptx major Elementary Education
Q2 Week 1.pptx Lesson on Kahalagahan ng Pamilya sa Edukasyon
Fun with Grammar (Communicative Activities for the Azar Grammar Series)
The TKT Course. Modules 1, 2, 3.for self study

Dependencies

  • 3. DEPENDENCIES o In this section we shall consider:  Data Dependence.  Control Dependence.
  • 4. DATA DEPENDENCIES A data dependency is a situation in which a program statement (instruction) refers to the data of a preceding statement.
  • 5. TYPES OF DATA DEPENDENCIES Three cases are exist…  True Data Dependence (flow dependence – read after write)  Output Dependence (write after write)  Anti Dependence (write after read)
  • 6. TRUE DATA DEPENDENCY  True data dependency is where one instruction depends on the final outcome of a previous instruction.  Also known as flow dependency or read after write dependency  Consider the code: ADD r1,r2 (r1 =r1+r2;) MOV r3,r1 (r3 = r1;)  Can fetch and decode second instruction in parallel with first  Can NOT execute second instruction until first is finished
  • 7. CONTINUE . . . MOV r1,[mem] MOV r3,r1 MOV r2,5 (Load r1 from memory) (r3 = r1;) (r2 = 5;)  The superscalar machine would execute the first and third instructions in parallel, yet have to wait anyway for the first instruction to finish before executing the second  This holds up MULTIPLE pipelines
  • 8. OUTPUT DEPENDENCY This type of dependency occurs when two instructions both write a result. If an instruction depends on the intermediate result, problems could occur Also known as write-write dependency R3 = R3 + R5; (I1) R4 = R3 + 1; (I2) R3 = R5 + 1; (I3) R7 = R3 + R4; (I4) I2 depends on result of I1 and I4 depends on result of I3 – true data dependency If I3 completes before I1, result from I1 will be written lost – output (write-write) dependency
  • 9. ANTIDEPENDENCY(WRITE AFTER READ)  Called Antidependency because it is the exact opposite of data dependency  Data dependency: instruction 2 depends on data from instruction 1  Antidependency: instruction 1 depends on data that could be destroyed by instruction 2
  • 10. CONTROL DEPENDENCY S1. if (a == b) S2. a = a + b S3. b = a + b
  • 11. RESOURCE CONFLICT  Two or more instructions requiring access to the same resource at the same time -- e.g. functional units, registers, bus  Similar to true data dependency, but it is possible to duplicate resources
  • 12. COMPARISON OF TRUE DATA, PROCEDURAL, AND RESOURCE CONFLICT DEPENDENCIES