SlideShare a Scribd company logo
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

PPTX
Database , 12 Reliability
PPT
Deadlock
PPT
15. Transactions in DBMS
PPTX
Lock based protocols
PPT
PPTX
Concurrency Control in Distributed Database.
PPSX
Functional dependency
PPTX
Generating code from dags
Database , 12 Reliability
Deadlock
15. Transactions in DBMS
Lock based protocols
Concurrency Control in Distributed Database.
Functional dependency
Generating code from dags

What's hot (20)

PPT
17. Recovery System in DBMS
PDF
Array Processor
PPTX
Unification and Lifting
PPTX
System calls
PPTX
Decomposition using Functional Dependency
PPT
Classical Planning
PPTX
Decomposition methods in DBMS
PPTX
2 phase locking protocol DBMS
PDF
Database recovery techniques
PPTX
Chapter-7 Relational Calculus
PPTX
Principle source of optimazation
PPT
11. Storage and File Structure in DBMS
PPTX
Signed Addition And Subtraction
PPT
Hashing PPT
PDF
Pipeline and data hazard
PPTX
Disk structure
PPTX
Deadlock ppt
PPTX
Deadlock dbms
PPTX
Church Turing Thesis
17. Recovery System in DBMS
Array Processor
Unification and Lifting
System calls
Decomposition using Functional Dependency
Classical Planning
Decomposition methods in DBMS
2 phase locking protocol DBMS
Database recovery techniques
Chapter-7 Relational Calculus
Principle source of optimazation
11. Storage and File Structure in DBMS
Signed Addition And Subtraction
Hashing PPT
Pipeline and data hazard
Disk structure
Deadlock ppt
Deadlock dbms
Church Turing Thesis
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)

PPT
advanced computer architesture-conditions of parallelism
DOCX
parallelism
PPTX
Instruction Level Parallelism – Compiler Techniques
PPT
instruction parallelism .ppt
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
PDF
Data mining final report
advanced computer architesture-conditions of parallelism
parallelism
Instruction Level Parallelism – Compiler Techniques
instruction parallelism .ppt
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
Data mining final report

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
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PPTX
Institutional Correction lecture only . . .
PDF
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
Classroom Observation Tools for Teachers
PDF
Pre independence Education in Inndia.pdf
PDF
Complications of Minimal Access Surgery at WLH
PDF
RMMM.pdf make it easy to upload and study
PPTX
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
PDF
Insiders guide to clinical Medicine.pdf
PPTX
Week 4 Term 3 Study Techniques revisited.pptx
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
Microbial diseases, their pathogenesis and prophylaxis
STATICS OF THE RIGID BODIES Hibbelers.pdf
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
Module 4: Burden of Disease Tutorial Slides S2 2025
Institutional Correction lecture only . . .
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
human mycosis Human fungal infections are called human mycosis..pptx
Classroom Observation Tools for Teachers
Pre independence Education in Inndia.pdf
Complications of Minimal Access Surgery at WLH
RMMM.pdf make it easy to upload and study
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
Insiders guide to clinical Medicine.pdf
Week 4 Term 3 Study Techniques revisited.pptx
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf

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