SlideShare ist ein Scribd-Unternehmen logo
1 von 12
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

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

Modes of transfer
Modes of transferModes of transfer
Modes of transfer
 
Lecture 1 introduction to parallel and distributed computing
Lecture 1   introduction to parallel and distributed computingLecture 1   introduction to parallel and distributed computing
Lecture 1 introduction to parallel and distributed computing
 
Addressing Modes
Addressing ModesAddressing Modes
Addressing Modes
 
Computer Organization Lecture Notes
Computer Organization Lecture NotesComputer Organization Lecture Notes
Computer Organization Lecture Notes
 
Presentation on flynn’s classification
Presentation on flynn’s classificationPresentation on flynn’s classification
Presentation on flynn’s classification
 
Micro program example
Micro program exampleMicro program example
Micro program example
 
Basic ops concept of comp
Basic ops  concept of compBasic ops  concept of comp
Basic ops concept of comp
 
pipelining
pipeliningpipelining
pipelining
 
Associative memory 14208
Associative memory 14208Associative memory 14208
Associative memory 14208
 
Parallel Processing Concepts
Parallel Processing Concepts Parallel Processing Concepts
Parallel Processing Concepts
 
Cache coherence problem and its solutions
Cache coherence problem and its solutionsCache coherence problem and its solutions
Cache coherence problem and its solutions
 
Lec 7 query processing
Lec 7 query processingLec 7 query processing
Lec 7 query processing
 
Centralized shared memory architectures
Centralized shared memory architecturesCentralized shared memory architectures
Centralized shared memory architectures
 
Instruction pipeline: Computer Architecture
Instruction pipeline: Computer ArchitectureInstruction pipeline: Computer Architecture
Instruction pipeline: Computer Architecture
 
Data transfer and manipulation
Data transfer and manipulationData transfer and manipulation
Data transfer and manipulation
 
Applications of paralleL processing
Applications of paralleL processingApplications of paralleL processing
Applications of paralleL processing
 
Parallel processing
Parallel processingParallel processing
Parallel processing
 
Pipelining and vector processing
Pipelining and vector processingPipelining and vector processing
Pipelining and vector processing
 
Multiprocessor architecture
Multiprocessor architectureMultiprocessor architecture
Multiprocessor architecture
 
Instruction Execution Cycle
Instruction Execution CycleInstruction Execution Cycle
Instruction Execution Cycle
 

Andere mochten auch

what is computer......?
what is computer......?what is computer......?
what is computer......?
aini ain
 
Computer_Architecture_O_ECEG-3163_01_Introduction (1)
Computer_Architecture_O_ECEG-3163_01_Introduction (1)Computer_Architecture_O_ECEG-3163_01_Introduction (1)
Computer_Architecture_O_ECEG-3163_01_Introduction (1)
Nebiyu Musie
 
Introduction to computer architecture and organization
Introduction to computer architecture and organizationIntroduction to computer architecture and organization
Introduction to computer architecture and organization
Muhammad Ishaq
 
Micro operation control of processor
Micro operation control of processorMicro operation control of processor
Micro operation control of processor
Muhammad Ishaq
 
Lecture 3
Lecture 3Lecture 3
Lecture 3
Mr SMAK
 
0 introduction to computer architecture
0 introduction to computer architecture0 introduction to computer architecture
0 introduction to computer architecture
aamc1100
 

Andere mochten auch (18)

1.prallelism
1.prallelism1.prallelism
1.prallelism
 
Resource dependency
Resource dependencyResource dependency
Resource dependency
 
Dependencies, dependencies, dependencies
Dependencies, dependencies, dependenciesDependencies, dependencies, dependencies
Dependencies, dependencies, dependencies
 
Input output
Input outputInput output
Input output
 
Business
Business Business
Business
 
what is computer......?
what is computer......?what is computer......?
what is computer......?
 
Causality in special relativity
Causality in special relativityCausality in special relativity
Causality in special relativity
 
Computer_Architecture_O_ECEG-3163_01_Introduction (1)
Computer_Architecture_O_ECEG-3163_01_Introduction (1)Computer_Architecture_O_ECEG-3163_01_Introduction (1)
Computer_Architecture_O_ECEG-3163_01_Introduction (1)
 
Introduction to computer architecture and organization
Introduction to computer architecture and organizationIntroduction to computer architecture and organization
Introduction to computer architecture and organization
 
Micro operation control of processor
Micro operation control of processorMicro operation control of processor
Micro operation control of processor
 
Writting process
Writting processWritting process
Writting process
 
Dram and its types
Dram and its typesDram and its types
Dram and its types
 
Multi core processor
Multi core processorMulti core processor
Multi core processor
 
Lecture 3
Lecture 3Lecture 3
Lecture 3
 
0 introduction to computer architecture
0 introduction to computer architecture0 introduction to computer architecture
0 introduction to computer architecture
 
Computer Architecture – An Introduction
Computer Architecture – An IntroductionComputer Architecture – An Introduction
Computer Architecture – An Introduction
 
Lec2 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- ILP
Lec2 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- ILPLec2 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- ILP
Lec2 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- ILP
 
Computer architecture
Computer architectureComputer architecture
Computer architecture
 

Ähnlich wie Dependencies

Pipeline and data hazard
Pipeline and data hazardPipeline and data hazard
Pipeline and data hazard
Waed Shagareen
 
DIRA: Automatic Detection, Identification, and Repair of Controll-Hijacking a...
DIRA: Automatic Detection, Identification, and Repair of Controll-Hijacking a...DIRA: Automatic Detection, Identification, and Repair of Controll-Hijacking a...
DIRA: Automatic Detection, Identification, and Repair of Controll-Hijacking a...
Alexey Smirnov
 
Oracle services on rac
Oracle services on racOracle services on rac
Oracle services on rac
maclean liu
 

Ähnlich wie Dependencies (19)

advanced computer architesture-conditions of parallelism
advanced computer architesture-conditions of parallelismadvanced computer architesture-conditions of parallelism
advanced computer architesture-conditions of parallelism
 
parallelism
parallelismparallelism
parallelism
 
Instruction Level Parallelism – Compiler Techniques
Instruction Level Parallelism – Compiler TechniquesInstruction Level Parallelism – Compiler Techniques
Instruction Level Parallelism – Compiler Techniques
 
Pipeline and data hazard
Pipeline and data hazardPipeline and data hazard
Pipeline and data hazard
 
Hazards in pipeline
Hazards in pipelineHazards in pipeline
Hazards in pipeline
 
module2.ppt
module2.pptmodule2.ppt
module2.ppt
 
High Performance Computer Architecture
High Performance Computer ArchitectureHigh Performance Computer Architecture
High Performance Computer Architecture
 
Unit 2 contd. and( unit 3 voice over ppt)
Unit 2 contd. and( unit 3   voice over ppt)Unit 2 contd. and( unit 3   voice over ppt)
Unit 2 contd. and( unit 3 voice over ppt)
 
Program and Network Properties
Program and Network PropertiesProgram and Network Properties
Program and Network Properties
 
DIRA: Automatic Detection, Identification, and Repair of Controll-Hijacking a...
DIRA: Automatic Detection, Identification, and Repair of Controll-Hijacking a...DIRA: Automatic Detection, Identification, and Repair of Controll-Hijacking a...
DIRA: Automatic Detection, Identification, and Repair of Controll-Hijacking a...
 
Parallel programming model
Parallel programming modelParallel programming model
Parallel programming model
 
hazard new.ppt
hazard new.ppthazard new.ppt
hazard new.ppt
 
CALecture3Module1.ppt
CALecture3Module1.pptCALecture3Module1.ppt
CALecture3Module1.ppt
 
Registers in coa
Registers in coaRegisters in coa
Registers in coa
 
PP DBMS - 2 (1) (1).pptx
PP DBMS - 2 (1) (1).pptxPP DBMS - 2 (1) (1).pptx
PP DBMS - 2 (1) (1).pptx
 
Oracle services on rac
Oracle services on racOracle services on rac
Oracle services on rac
 
Data mining final report
Data mining final reportData mining final report
Data mining final report
 
Bca examination 2016 csa
Bca examination 2016 csaBca examination 2016 csa
Bca examination 2016 csa
 
A Lightweight Instruction Scheduling Algorithm For Just In Time Compiler
A Lightweight Instruction Scheduling Algorithm For Just In Time CompilerA Lightweight Instruction Scheduling Algorithm For Just In Time Compiler
A Lightweight Instruction Scheduling Algorithm For Just In Time Compiler
 

Mehr von Muhammad Ishaq (17)

Business proposal
Business proposalBusiness proposal
Business proposal
 
Artificial neural network model & hidden layers in multilayer artificial neur...
Artificial neural network model & hidden layers in multilayer artificial neur...Artificial neural network model & hidden layers in multilayer artificial neur...
Artificial neural network model & hidden layers in multilayer artificial neur...
 
Artificial Neural Network
Artificial Neural NetworkArtificial Neural Network
Artificial Neural Network
 
Index
IndexIndex
Index
 
Brochures
BrochuresBrochures
Brochures
 
Computer architecture overview
Computer architecture overviewComputer architecture overview
Computer architecture overview
 
Raid 1 3
Raid 1 3Raid 1 3
Raid 1 3
 
Multi processing
Multi processingMulti processing
Multi processing
 
Cache memory
Cache memoryCache memory
Cache memory
 
Cache memory
Cache memoryCache memory
Cache memory
 
Addressing
AddressingAddressing
Addressing
 
Clusters
ClustersClusters
Clusters
 
Raid level 4
Raid level 4Raid level 4
Raid level 4
 
Bus interconnection
Bus interconnectionBus interconnection
Bus interconnection
 
Processor structure and funtions
Processor structure and funtionsProcessor structure and funtions
Processor structure and funtions
 
Superscalar & superpipeline processor
Superscalar & superpipeline processorSuperscalar & superpipeline processor
Superscalar & superpipeline processor
 
Input output module
Input output moduleInput output module
Input output module
 

Kürzlich hochgeladen

Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 

Kürzlich hochgeladen (20)

TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Magic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptxMagic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptx
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 

Dependencies

  • 1.
  • 2.
  • 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