PIpeline Processing and Multi Processing
PIpeline Processing and Multi Processing
PIpeline Processing and Multi Processing
Pipelines
Processing and Class : Iot 3rd sem
Submitted to:
Prof. Aditya Singh bias
Pipeline in a System
Welcome to our presentation on pipelines in a
system. In this session, we will explore the
definition, components, benefits, challenges, and
best practices of implementing pipelines
Parallel Processing, Pipelining-Arithmetic Pipeline,
Instruction Pipeline
.
What is Pipeline :
Pipelining is the process of accumulating instruction
from the processor through a pipeline. It allows
storing and executing instructions in an orderly
process. It is also known as pipeline processing.
• In this stage, the processor fetches the next instruction from memory.
• The program counter (PC) is used to determine the address of the instruction to be fetched.
• The fetched instruction is then placed in a temporary storage called the instruction register
(IR).
➢ Decode (ID - Instruction Decode) :
• In this stage, the fetched instruction is decoded to determine the operation it represents and
the operands involved.
• It involves identifying the instruction type, decoding registers, and determining the control
signals.
➢ Execute (EX - Execution) :
• The instruction's operation is executed in this stage.
• For arithmetic instructions, this stage performs calculations.
• For branch instructions, it evaluates conditions to determine the next instruction's address.
• For memory access instructions, it calculates memory addresses and accesses data.
➢ Memory (MEM - Memory Access) :
Where x and y refer to the exponents and X and Y refer to two fractions representing the mantissa.
The floating-point addition and subtraction process is broken into four pieces. The matching sub-operation to be executed
in the specified pipeline is contained in each segment. The four segments depict the following sub-operations:
Later in this section, we’ll go through each sub-operation in greater depth. The sub-operations conducted in each pipeline
section are depicted
1. Comparing Exponents by Subtraction
The difference between the exponents is calculated by subtracting them. The
result’s exponent is chosen to be the larger exponent.
The exponent difference, 3 – 2 = 1, defines the total number of times the
mantissa associated with the lesser exponent should be shifted to the right.
Pipeline processing can happen not only in the data stream but also in the instruction
stream. To perform tasks such as fetching, decoding and execution of instructions,
most digital computers with complicated instructions would require an instruction
pipeline.
In general, each and every instruction must be processed by the computer in the
following order:
Segment 1
The implementation of the instruction fetch segment can be done
using the FIFO or first-in, first-out buffer.
Segment 2
In the second segment, the memory instruction is decoded, and the
effective address is then determined in a separate arithmetic circuit.
Segment 3
In the third segment, some operands would be fetched from memory.
Segment 4
The instructions would finally be executed in the very last segment of
a pipeline organisation.
Disadvantages Of Pipeline
❖ Resource Conflicts: Pipelines can suffer from resource conflicts, where multiple stages need the same hardware simultaneously, leading to pipeline stalls
and reduced efficiency.
❖ Branch Prediction: Handling branch instructions can be challenging in a pipeline, as predicting the outcome of a branch correctly is not always possible,
resulting in wasted clock cycles.
❖ Data Hazards: Data dependencies between instructions can cause hazards, requiring complex forwarding and stall mechanisms to resolve, impacting pipeline
throughput.
❖ Costly Pipeline Stalls: When an instruction encounters an issue like a cache miss or a long-latency operation, it can cause pipeline stalls, reducing overall performance.
❖ Instruction Mix Sensitivity: Pipelines may be sensitive to the mix of instructions in a program, with some types of code (e.g., heavily branching) performing less efficiently
in a pipeline.
❖ Increased Complexity: Pipelined architectures are more complex to design and implement than non-pipelined architectures, which can increase manufacturing costs.
❖ Energy Efficiency: In some cases, pipelined processors may consume more power compared to simpler designs, affecting energy efficiency.
❖ Limited Gains for Simple Tasks: For very simple or short tasks, the overhead of pipelining may outweigh the performance benefits, making it less efficient.
❖ Synchronization Overhead: Handling multiple stages and ensuring correct instruction execution order can introduce synchronization overhead, potentially slowing down
the processor.
❖ Programming Challenges: Writing software that fully utilizes the pipeline's capabilities and avoids hazards can be complex, making programming for pipelined
architectures more challenging.
These disadvantages highlight the trade-offs and challenges associated with pipelining in computer architecture. While pipelines can significantly improve processor
performance for certain workloads, they also introduce complexities that need to be managed.
AdvantagesOf Pipeline
❖ Improved Throughput: Pipelining allows multiple instructions to be processed simultaneously, increasing the overall throughput of
the processor.
❖ Faster Execution: Instructions can overlap, reducing the time it takes to complete a single instruction.
❖ Resource Utilization: Different stages of the pipeline can be used by different instructions at the same time, maximizing resource
utilization.
❖ Reduced CPU Idle Time: It minimizes CPU idle time by keeping the pipeline busy, which improves overall performance.
❖ Simplifies Control: The control logic is simplified as each stage has a specific function, making it easier to design and manage.
❖ Scalability: Pipelining can be scaled by adding more stages or increasing the depth to accommodate more complex processors.
❖ Lower Clock Speed: It allows for lower clock speeds per pipeline stage, which can reduce power consumption and heat generation.
❖ Parallel Processing: Pipelines can be used for parallel processing, where multiple tasks are executed concurrently, improving
system efficiency.
❖ Instruction Mix: It can handle a mix of instruction types, including arithmetic, logic, and memory operations, efficiently.
❖ Overall Performance Boost: The combination of these advantages results in an overall performance boost for the processor.
Keep in mind that while pipelining offers numerous advantages, it also introduces challenges like pipeline hazards, which need to be
managed for optimal performance.
Examples of Successful Pipeline Implementations
BAD BOY