Page 97 - Computer_Science_F5
P. 97
Computer Science With pipelining: if this process is broken into pipelines, the pipeline stages must
be able to accommodate the slowest operation, as shown in Figure 2.6 For Mama
chapati, the longest stage is kneading which takes 10 minutes.
FOR ONLINE READING ONLY
Figure 2.6: Average time = 80 /4 = 20 minutes
Average time without pipelining 30 minutes
Speedup = = =1.5
average time with pipelining 20 minutes
Therefore, pipelined operation improves performance by increasing instruction
throughput. Higher throughput means more instructions can be executed in a given
unit of time.
The performance of a pipeline is judged by two key metrics: throughput and latency.
Throughput, measured as instructions completed per unit of time, reflects the overall
processing speed. A higher throughput indicates faster instruction processing.
Factors like pipeline length, clock frequency, efficiency of individual instructions,
and the presence of stalls or hazards can all impact throughput.
Number of instructions executed
Throughput =
Execution time
On the other hand, latency measures the time taken for a single instruction to
finish execution. It essentially represents the delay or travel time an instruction
experiences as it progresses through the pipeline stages. Lower latency signifies
better performance. Pipeline length, depth (number of stages), clock cycle time,
dependencies between instructions, and pipeline hazards all influence latency.
Execution time
Latency =
Number of instructions executed
Excution time can be reduced, as shown in Figure 2.7, where a 5-stage pipeline has
reduced the execution time for 6 instructions from 30 time units to 10 time units.
88
for Advanced Secondary Schools
Computer Science Form 5.indd 88 23/07/2024 12:33