SlideShare a Scribd company logo
1 of 22
Pipelining
Overview
Pipelining is widely used in modern
processors.
Pipelining improves system performance in
terms of throughput.[No of work done at a
given time]
Basic Concepts
Ability of a processor to perform more than one tasks in
single time duration is called pipelining.
MACHINE CYCLE/
INSTRUCTION CYCLE
MACHINE CYCLE
Pipelining
It is technique of decomposing a sequential
process into suboperation, with each
suboperation completed in dedicated
segment.
Pipeline is commonly known as an assembly
line operation.
Traditional Pipeline Concept
Laundry Example
Ann, Brian, Cathy, Dave
each have one load of clothes
to wash, dry, and fold
Washer takes 30 minutes
Dryer takes 40 minutes
“Folder” takes 20 minutes
A B C D
Traditional Pipeline Concept
A
B
C
D
30 40 20 30 40 20 30 40 20 30 40 20
Sequential laundry takes 6
hours for 4 loads
If they learned pipelining,
how long would laundry
take?
6 PM 7 8 9 10 11 Midnight
Time
Traditional Pipeline Concept
Pipelined laundry takes
3.5 hours for 4 loads
A
B
C
D
6 PM 7 8 9 10 11 Midnight
T
a
s
k
O
r
d
e
r
Time
30 40 40 40 40 20
Traditional Pipeline Concept
Pipelining doesn’t help
latency of single task, it
helps throughput of entire
workload
Pipeline rate limited by
slowest pipeline stage
Multiple tasks operating
simultaneously using
different resources
Unbalanced lengths of pipe
stages reduces speedup
Time to “fill” pipeline and
time to “drain” it reduces
speedup.
A
B
C
D
6 PM 7 8 9
T
a
s
k
O
r
d
e
r
Time
30 40 40 40 40 20
Idea of pipelining in computer
The processor execute the program by
fetching and executing instructions. One after
the other.
Let Fi and Ei refer to the fetch and execute
steps for instruction Ii
Use the Idea of Pipelining in a
Computer
F1
E1
F2
E2
F3
E3
I1 I2 I3
(a) Sequential execution
Instruction
fetch
unit
Execution
unit
Interstage buffer
B1
(b) Hardware organization
Time
F1 E1
F2 E2
F3 E3
Instruction
I1
I2
I3
(c) Pipelined execution
Figure Basic idea of instruction pipelining.
Clock cycle 1 2 3 4
Time
Fetch + Execution
Contd.,
Computer that has two separate hardware
units, one for fetching and another for
executing them.
the instruction fetched by the fetch unit is
deposited in an intermediate buffer B1.
This buffer needed to enable the execution
unit while fetch unit fetching the next
instruction.
The computer is controlled by a clock.
Any instruction fetch and execute steps
completed in one clock cycle.
Use the Idea of Pipelining in a
Computer Clock cycle 1 2 3 4 5 6
Time
7
Instruction
I1 F1 D1 E1 W1
I2 F2 D2 E2 W2
I3 F3 D3 E3 W3
I4 F4 D4 E4 W4
Figure A 4stage pipeline.
(a) Instruction execution divided into four steps
Interstage buffers
F : Fetch
instruction
D : Decode
and fetch
operands
instruction E: Execute
operation
W : Write
results
(b) Hardware organization
B1 B2 B3
Fetch + Decode
+ Execution + Write
Fetch(F)- read the instruction from the memory
Decode(D)- Decode the instruction and fetch
the source operand
Execute(E)- perform the operation specified by
the instruction
Write(W)- store the result in the destination
location
Role of Cache Memory
Each pipeline stage is expected to complete in one
clock cycle.
The clock period should be long enough to let the
slowest pipeline stage to complete.
Faster stages can only wait for the slowest one to
complete.
Since main memory is very slow compared to the
execution, if each instruction needs to be fetched
from main memory, pipeline is almost useless.ten
times greater than the time needed to perform
pipeline stage]
Fortunately, we have cache.
Pipeline Performance
The potential increase in performance
resulting from pipelining is proportional to the
number of pipeline stages.
However, this increase would be achieved
only if all pipeline stages require the same
time to complete, and there is no interruption
throughout program execution.
Unfortunately, this is not true.
Floating point may involve many clock cycle
Pipeline Performance
F1 D1 E1 W1
F2 D2 E2 W2
F3
Instruction
I1
I2
I3 E3
D3 W3
D4 E4 W4
F4
I4
Clock c
ycle 1 2 3 4 5 6 7 8
Time
9
Figure Effect of an execution operation taking more than one clock cycle.
F5 D5 E5
I5
Pipeline Performance
• The previous pipeline is said to have been stalled for two
clock cycles.
• Any condition that causes a pipeline to stall is called a
hazard.
• Data hazard – any condition in which either the source or
the destination operands of an instruction are not
available at the time expected in the pipeline. So some
operation has to be delayed, and the pipeline stalls.
• Instruction (control) hazard – a delay in the availability of
an instruction causes the pipeline to stall.[cache miss]
• Structural hazard – the situation when two instructions
require the use of a given hardware resource at the same
time.
Pipeline Performance
F1 D1 E1 W1
F2 D2 E2 W2
F3 D3 E3 W3
I1
I2
I3
Clock cycle 1 2 3 4 5 6
Instruction
Figure . Pipeline stall caused by a cache miss in F2.
7 8 9
(a) Instruction execution steps in successive clock cycles
(b) Function performed by each processor stage in successive clock cycles
Time
Clock cycle 1 2 3 4 5 6 7 8 9
Stage
F: Fetch F1 F2 F2 F2 F2 F3
D: Decode D1 idle idle idle D2 D3
E: Execute E1 idle idle idle E2 E3
W: Write W1 idle idle idle W2 W3
Time
Idle periods –
stalls (bubbles)
Instruction
hazard(Cache
miss)
Decode unit is idle
in cycles 3 through
5, Execute unit idle
in cycle 4 through 6
and write unit is idle
in cycle 5 through 7
such idle period is
called stalls.
THE END

More Related Content

Similar to pipelining.pptx

Instruction pipeline: Computer Architecture
Instruction pipeline: Computer ArchitectureInstruction pipeline: Computer Architecture
Instruction pipeline: Computer ArchitectureInteX Research Lab
 
print.pptx
print.pptxprint.pptx
print.pptxkalai75
 
CPU Pipelining and Hazards - An Introduction
CPU Pipelining and Hazards - An IntroductionCPU Pipelining and Hazards - An Introduction
CPU Pipelining and Hazards - An IntroductionDilum Bandara
 
Pipelining and co processor.
Pipelining and co processor.Pipelining and co processor.
Pipelining and co processor.Piyush Rochwani
 
Pipelining of Processors Computer Architecture
Pipelining of  Processors Computer ArchitecturePipelining of  Processors Computer Architecture
Pipelining of Processors Computer ArchitectureHaris456
 
Lec18 pipeline
Lec18 pipelineLec18 pipeline
Lec18 pipelineGRajendra
 
Pipeline hazard
Pipeline hazardPipeline hazard
Pipeline hazardAJAL A J
 
Design pipeline architecture for various stage pipelines
Design pipeline architecture for various stage pipelinesDesign pipeline architecture for various stage pipelines
Design pipeline architecture for various stage pipelinesMahmudul Hasan
 
Pipelining
PipeliningPipelining
PipeliningAmin Omi
 
PIPELINE INTERRUPTS
PIPELINE INTERRUPTSPIPELINE INTERRUPTS
PIPELINE INTERRUPTSM R Karthik
 
11-Serial_vs_Pipelined.pptx
11-Serial_vs_Pipelined.pptx11-Serial_vs_Pipelined.pptx
11-Serial_vs_Pipelined.pptxDanyMerhej1
 
Pipelining 16 computers Artitacher pdf
Pipelining   16 computers Artitacher  pdfPipelining   16 computers Artitacher  pdf
Pipelining 16 computers Artitacher pdfMadhuGupta99385
 
pipehhhhhhhhhhhhhbbbbbbbbblinehazards.ppt
pipehhhhhhhhhhhhhbbbbbbbbblinehazards.pptpipehhhhhhhhhhhhhbbbbbbbbblinehazards.ppt
pipehhhhhhhhhhhhhbbbbbbbbblinehazards.pptAkkiDongre
 
Pipeline & Nonpipeline Processor
Pipeline & Nonpipeline ProcessorPipeline & Nonpipeline Processor
Pipeline & Nonpipeline ProcessorSmit Shah
 

Similar to pipelining.pptx (20)

Instruction pipeline: Computer Architecture
Instruction pipeline: Computer ArchitectureInstruction pipeline: Computer Architecture
Instruction pipeline: Computer Architecture
 
print.pptx
print.pptxprint.pptx
print.pptx
 
CPU Pipelining and Hazards - An Introduction
CPU Pipelining and Hazards - An IntroductionCPU Pipelining and Hazards - An Introduction
CPU Pipelining and Hazards - An Introduction
 
Pipelining and co processor.
Pipelining and co processor.Pipelining and co processor.
Pipelining and co processor.
 
Pipelining of Processors Computer Architecture
Pipelining of  Processors Computer ArchitecturePipelining of  Processors Computer Architecture
Pipelining of Processors Computer Architecture
 
COA Unit-5.pptx
COA Unit-5.pptxCOA Unit-5.pptx
COA Unit-5.pptx
 
Lec18 pipeline
Lec18 pipelineLec18 pipeline
Lec18 pipeline
 
Pipeline hazard
Pipeline hazardPipeline hazard
Pipeline hazard
 
3 Pipelining
3 Pipelining3 Pipelining
3 Pipelining
 
Design pipeline architecture for various stage pipelines
Design pipeline architecture for various stage pipelinesDesign pipeline architecture for various stage pipelines
Design pipeline architecture for various stage pipelines
 
Pipelining
PipeliningPipelining
Pipelining
 
PIPELINE INTERRUPTS
PIPELINE INTERRUPTSPIPELINE INTERRUPTS
PIPELINE INTERRUPTS
 
11-Serial_vs_Pipelined.pptx
11-Serial_vs_Pipelined.pptx11-Serial_vs_Pipelined.pptx
11-Serial_vs_Pipelined.pptx
 
Presentation1(1)
Presentation1(1)Presentation1(1)
Presentation1(1)
 
Tn6 facility layout
Tn6 facility layoutTn6 facility layout
Tn6 facility layout
 
Tn6 facility+layout
Tn6 facility+layoutTn6 facility+layout
Tn6 facility+layout
 
Pipelining 16 computers Artitacher pdf
Pipelining   16 computers Artitacher  pdfPipelining   16 computers Artitacher  pdf
Pipelining 16 computers Artitacher pdf
 
pipehhhhhhhhhhhhhbbbbbbbbblinehazards.ppt
pipehhhhhhhhhhhhhbbbbbbbbblinehazards.pptpipehhhhhhhhhhhhhbbbbbbbbblinehazards.ppt
pipehhhhhhhhhhhhhbbbbbbbbblinehazards.ppt
 
Pipeline & Nonpipeline Processor
Pipeline & Nonpipeline ProcessorPipeline & Nonpipeline Processor
Pipeline & Nonpipeline Processor
 
Pipelining In computer
Pipelining In computer Pipelining In computer
Pipelining In computer
 

More from MUNAZARAZZAQELEA (9)

Lab Manual-OOP.pdf
Lab Manual-OOP.pdfLab Manual-OOP.pdf
Lab Manual-OOP.pdf
 
cache memory.ppt
cache memory.pptcache memory.ppt
cache memory.ppt
 
K Map.pptx
K Map.pptxK Map.pptx
K Map.pptx
 
ch3a-binary-numbers.ppt
ch3a-binary-numbers.pptch3a-binary-numbers.ppt
ch3a-binary-numbers.ppt
 
CHAPTER 5B.ppt
CHAPTER 5B.pptCHAPTER 5B.ppt
CHAPTER 5B.ppt
 
CHAPTER 5A.ppt
CHAPTER 5A.pptCHAPTER 5A.ppt
CHAPTER 5A.ppt
 
CHAPTER 4 B.ppt
CHAPTER 4 B.pptCHAPTER 4 B.ppt
CHAPTER 4 B.ppt
 
CHAPTER 1B.ppt
CHAPTER 1B.pptCHAPTER 1B.ppt
CHAPTER 1B.ppt
 
cache memory.ppt
cache memory.pptcache memory.ppt
cache memory.ppt
 

Recently uploaded

MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).pptssuser5c9d4b1
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...RajaP95
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college projectTonystark477637
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 

Recently uploaded (20)

Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 

pipelining.pptx

  • 2. Overview Pipelining is widely used in modern processors. Pipelining improves system performance in terms of throughput.[No of work done at a given time]
  • 3. Basic Concepts Ability of a processor to perform more than one tasks in single time duration is called pipelining.
  • 6. Pipelining It is technique of decomposing a sequential process into suboperation, with each suboperation completed in dedicated segment. Pipeline is commonly known as an assembly line operation.
  • 7. Traditional Pipeline Concept Laundry Example Ann, Brian, Cathy, Dave each have one load of clothes to wash, dry, and fold Washer takes 30 minutes Dryer takes 40 minutes “Folder” takes 20 minutes A B C D
  • 8. Traditional Pipeline Concept A B C D 30 40 20 30 40 20 30 40 20 30 40 20 Sequential laundry takes 6 hours for 4 loads If they learned pipelining, how long would laundry take? 6 PM 7 8 9 10 11 Midnight Time
  • 9. Traditional Pipeline Concept Pipelined laundry takes 3.5 hours for 4 loads A B C D 6 PM 7 8 9 10 11 Midnight T a s k O r d e r Time 30 40 40 40 40 20
  • 10. Traditional Pipeline Concept Pipelining doesn’t help latency of single task, it helps throughput of entire workload Pipeline rate limited by slowest pipeline stage Multiple tasks operating simultaneously using different resources Unbalanced lengths of pipe stages reduces speedup Time to “fill” pipeline and time to “drain” it reduces speedup. A B C D 6 PM 7 8 9 T a s k O r d e r Time 30 40 40 40 40 20
  • 11. Idea of pipelining in computer The processor execute the program by fetching and executing instructions. One after the other. Let Fi and Ei refer to the fetch and execute steps for instruction Ii
  • 12. Use the Idea of Pipelining in a Computer F1 E1 F2 E2 F3 E3 I1 I2 I3 (a) Sequential execution Instruction fetch unit Execution unit Interstage buffer B1 (b) Hardware organization Time F1 E1 F2 E2 F3 E3 Instruction I1 I2 I3 (c) Pipelined execution Figure Basic idea of instruction pipelining. Clock cycle 1 2 3 4 Time Fetch + Execution
  • 13. Contd., Computer that has two separate hardware units, one for fetching and another for executing them. the instruction fetched by the fetch unit is deposited in an intermediate buffer B1. This buffer needed to enable the execution unit while fetch unit fetching the next instruction.
  • 14. The computer is controlled by a clock. Any instruction fetch and execute steps completed in one clock cycle.
  • 15. Use the Idea of Pipelining in a Computer Clock cycle 1 2 3 4 5 6 Time 7 Instruction I1 F1 D1 E1 W1 I2 F2 D2 E2 W2 I3 F3 D3 E3 W3 I4 F4 D4 E4 W4 Figure A 4stage pipeline. (a) Instruction execution divided into four steps Interstage buffers F : Fetch instruction D : Decode and fetch operands instruction E: Execute operation W : Write results (b) Hardware organization B1 B2 B3 Fetch + Decode + Execution + Write
  • 16. Fetch(F)- read the instruction from the memory Decode(D)- Decode the instruction and fetch the source operand Execute(E)- perform the operation specified by the instruction Write(W)- store the result in the destination location
  • 17. Role of Cache Memory Each pipeline stage is expected to complete in one clock cycle. The clock period should be long enough to let the slowest pipeline stage to complete. Faster stages can only wait for the slowest one to complete. Since main memory is very slow compared to the execution, if each instruction needs to be fetched from main memory, pipeline is almost useless.ten times greater than the time needed to perform pipeline stage] Fortunately, we have cache.
  • 18. Pipeline Performance The potential increase in performance resulting from pipelining is proportional to the number of pipeline stages. However, this increase would be achieved only if all pipeline stages require the same time to complete, and there is no interruption throughout program execution. Unfortunately, this is not true. Floating point may involve many clock cycle
  • 19. Pipeline Performance F1 D1 E1 W1 F2 D2 E2 W2 F3 Instruction I1 I2 I3 E3 D3 W3 D4 E4 W4 F4 I4 Clock c ycle 1 2 3 4 5 6 7 8 Time 9 Figure Effect of an execution operation taking more than one clock cycle. F5 D5 E5 I5
  • 20. Pipeline Performance • The previous pipeline is said to have been stalled for two clock cycles. • Any condition that causes a pipeline to stall is called a hazard. • Data hazard – any condition in which either the source or the destination operands of an instruction are not available at the time expected in the pipeline. So some operation has to be delayed, and the pipeline stalls. • Instruction (control) hazard – a delay in the availability of an instruction causes the pipeline to stall.[cache miss] • Structural hazard – the situation when two instructions require the use of a given hardware resource at the same time.
  • 21. Pipeline Performance F1 D1 E1 W1 F2 D2 E2 W2 F3 D3 E3 W3 I1 I2 I3 Clock cycle 1 2 3 4 5 6 Instruction Figure . Pipeline stall caused by a cache miss in F2. 7 8 9 (a) Instruction execution steps in successive clock cycles (b) Function performed by each processor stage in successive clock cycles Time Clock cycle 1 2 3 4 5 6 7 8 9 Stage F: Fetch F1 F2 F2 F2 F2 F3 D: Decode D1 idle idle idle D2 D3 E: Execute E1 idle idle idle E2 E3 W: Write W1 idle idle idle W2 W3 Time Idle periods – stalls (bubbles) Instruction hazard(Cache miss) Decode unit is idle in cycles 3 through 5, Execute unit idle in cycle 4 through 6 and write unit is idle in cycle 5 through 7 such idle period is called stalls.