Chapter 7 (Calculation part)
Equal stages have non-pipelining and pipelining.
n=number of instruction
k=stage
t=delay/cycle time
Total time of
Non pipelining
formula of Non-pipelining(To)=n*k*t
Pipelining
formula of pipelining(Tk)=(k+(n-1))*t
Speedup
=To/Tk
Throughput of
Non-pipelining=n/(To)
Pipelining=n/(Tk)
Example:
Calculate what is the total processing time, throughput and speedup of 100 instructions that have a 4 equal stages of delays(cycle time) of 2s each if the instructions are
—Pipelined
—Non-pipelined
In this question,n(instruction of number)=100
k(stage)=4
t(cycle/delay time)=2sec
Pipelined=(Tk)
=(Tk)=(k+(n-1))*t
=(4+(100-1))*t
=103*2s
=206s
Non-pipelined=(To)
=(n*k*t)
=(100*4*2s)
=800s
Speedup=(To/Tk)
=800/206
=3.883(after rounding)
Throughput of
pipelining=n/(Tk)
=100/206s
=0.485 ins/sec (instruction/second)
non-pipelining=n/(To)
=100/800s
=0.125ins/sec (instruction/second)
Unequal stage have non-pipelining and pipelining.
n=number of instruction
k=stage
t=cycle/delay time
Given FOUR instructions where each instruction has SIX stages (FI, DI, EI,
FO, ME and WO) with delays of 3, 2, 4, 2, 3 and 2. Calculate the speedup and throughput for
pipeline and non-pipeline.
n(number of instruction)=4
k(stage)=6
Total-time of
non-pipelining(To)=n*
=4*(4+4+4+4+4+2) *(take the maximum of time and the last one take the original of the time)
(why we take 4 five times and 2 one times?because the stage is 6,only the last stage use original time and other use maximum)
=4*22
=88s
Pipelining=
=(4+4+4+4+4+2)+(4-1)*4
=22+(3*4)
=22+12
=34s
Speedup
=To/Tk
=88/34
=2.588times
Throughput
Non-pipelining
=n/To
=4/88s
=0.045ins
Pipelining
=n/Tk
=4/34
=0.118ins
n=number of instruction
k=stage
t=delay/cycle time
Total time of
Non pipelining
formula of Non-pipelining(To)=n*k*t
Pipelining
formula of pipelining(Tk)=(k+(n-1))*t
Speedup
=To/Tk
Throughput of
Non-pipelining=n/(To)
Pipelining=n/(Tk)
Example:
Calculate what is the total processing time, throughput and speedup of 100 instructions that have a 4 equal stages of delays(cycle time) of 2s each if the instructions are
—Pipelined
—Non-pipelined
In this question,n(instruction of number)=100
k(stage)=4
t(cycle/delay time)=2sec
In
Total time ofPipelined=(Tk)
=(Tk)=(k+(n-1))*t
=(4+(100-1))*t
=103*2s
=206s
Non-pipelined=(To)
=(n*k*t)
=(100*4*2s)
=800s
Speedup=(To/Tk)
=800/206
=3.883(after rounding)
Throughput of
pipelining=n/(Tk)
=100/206s
=0.485 ins/sec (instruction/second)
non-pipelining=n/(To)
=100/800s
=0.125ins/sec (instruction/second)
Unequal stage have non-pipelining and pipelining.
n=number of instruction
k=stage
t=cycle/delay time
Given FOUR instructions where each instruction has SIX stages (FI, DI, EI,
FO, ME and WO) with delays of 3, 2, 4, 2, 3 and 2. Calculate the speedup and throughput for
pipeline and non-pipeline.
n(number of instruction)=4
k(stage)=6
Total-time of
non-pipelining(To)=n*
=4*(4+4+4+4+4+2) *(take the maximum of time and the last one take the original of the time)
(why we take 4 five times and 2 one times?because the stage is 6,only the last stage use original time and other use maximum)
=4*22
=88s
Pipelining=
=(4+4+4+4+4+2)+(4-1)*4
=22+(3*4)
=22+12
=34s
Speedup
=To/Tk
=88/34
=2.588times
Throughput
Non-pipelining
=n/To
=4/88s
=0.045ins
Pipelining
=n/Tk
=4/34
=0.118ins
0 comments: