0% found this document useful (0 votes)
45 views19 pages

Pipelining Size and Depth

This document discusses parallel processing concepts including pipelining, size, and depth. It provides examples of how pipelining works by decomposing tasks into sequential sub-operations that can execute concurrently. Pipelining is analogous to an industrial assembly line where different stages operate in parallel. The document also explains that size refers to the amount of data or tasks processed in parallel, while depth represents the level of parallelism through concurrent subtask execution.

Uploaded by

wardabibi69
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views19 pages

Pipelining Size and Depth

This document discusses parallel processing concepts including pipelining, size, and depth. It provides examples of how pipelining works by decomposing tasks into sequential sub-operations that can execute concurrently. Pipelining is analogous to an industrial assembly line where different stages operate in parallel. The document also explains that size refers to the amount of data or tasks processed in parallel, while depth represents the level of parallelism through concurrent subtask execution.

Uploaded by

wardabibi69
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 19

Parallel Processing (CS417)

by
Nazia Shahzadi
[email protected]
Lecturer (FCSE)
Ghulam Ishaq Khan Institute,
Topi, KPK, Pakistan
Pipelining
• Pipelining:
• A way of speeding up the execution of instructions
• Key Idea:
• Overlap execution of multiple instructions
Pipelining
• Pipelining is a technique of decomposing a sequential process into sub-operations,
with each sub-operation being executed in a special dedicated segment that
operates concurrently with all other segments.
• Each segment performs partial processing dictated by the way the task is
portioned.
• The result obtained from each segment is passed to the next segment.
• The final result is achieved when data is passed from all segments.
Pipelining Analogy: An Industrial Assembly Line
• The concept of pipeline in parallel processing is similar to an industrial
assembly line.
• As in industry there are three different divisions:
1. Manufacturing
2. Packaging
3. Delivery
• This overall process results in speed up of a system.

Product/ Time Time 1 Time 2 Time 3 Time 4 Time 5….


Manufacturing P1 P2 P3 P4 P5
packaging P1 P2 P3 P4
Delivery P1 P2 P3
Example
• Suppose, the following expression is to be evaluated for i = 1, 2 , 3, …, 7
Ai * Bi + Ci for i = 1, 2, 3, … , 7
• With pipelining, each sub-operation is to be implemented in a segment
• Each segment has one or two registers and a combined circuit
• The sub-operation in each of the segments will be as follows:

Load A and B
R1← A
R2← B
Multiply and Load C
R3 R1 * R2, R4 ← C
R5 R3 + R4
Contents of Registers in Pipelining
General Structure of a 3-Segment Pipelining

• Each segment consists of a combinational circuit Si that performs a sub-operation over


the data stream flowing through the pipe
• The segments are separated by a register Ri that holds the immediate results between the
stages
• Information flows between adjacent stages under the control of a common clock applied
to all registers immediately
Pipelining Performance
Question!!!

Determine the number of cycles that it takes to process 200 tasks in a six-
segment pipeline
Solution

K= 6
n = 200
Number of clock cycles required = (K + n – 1) clock cycles
= (6 + 200 – 1)
= 205 clock cycles
Arithmetic Pipeline
Instruction Pipeline
Processor Pipeline
Size and Depth in
Parallel Processors
Size and Depth in Parallel Processors
(1/3)

• Size:

Size refers to the amount of data or the number of tasks that are being processed in parallel. In
parallel processing, having a sufficiently large workload is crucial to fully utilize the available
resources.

Example: Imagine you have a set of 1,000,000 integers, and you want to calculate the sum of
these numbers using parallel processing. If you divide this task into smaller chunks of 100,000
integers each and distribute them across 10 processors, you have a size of 100,000 for each
chunk.
Size and Depth in Parallel Processors
(2/3)

• Depth:

Depth represents the level of parallelism or how many stages of processing occur in parallel.
It's about breaking down a task into subtasks that can be executed concurrently.

Example: Consider a sorting algorithm like Merge Sort. It involves dividing the array into
smaller subarrays, sorting those subarrays, and then merging them back together. The depth of
parallelism in Merge Sort is determined by how many levels of merging can be done
concurrently. If you have enough processors, you can reduce the depth, making the algorithm
faster.
Size and Depth in Parallel Processors
(3/3)

• Depth Example:
Let's consider a parallel matrix multiplication algorithm as an example of depth: Suppose you
want to multiply two 4x4 matrices, A and B, to get a resulting matrix C. In a parallel algorithm,
you can break down the task into stages:

1.Splitting:
Divide the matrices A and B into smaller submatrices, for example, into 2x2 submatrices.

2.Multiplication:
Multiply the corresponding submatrices in parallel. This is the depth of the algorithm, as it
involves performing multiplications concurrently.

3.Combining:
Combine the results of the submatrix multiplications to form the final matrix C.
The depth of parallelism in this case is the second stage, where matrix multiplications occur
simultaneously. In this specific example, the depth is 4 (as we have four 2x2 submatrices to
multiply in parallel).
THE END

You might also like