Parallel Processing
Chapter 7
1
Introduction
 A traditional way to increase computer system performance is to use
multiple processors that can execute in parallel to support a given
workload.
 The most common multiple-processor organizations is Symmetric
Multiprocessors (SMPs).
 SMP consists of multiple similar processors within the same computer,
interconnected by a bus or some sort of switching arrangement.
 Each processor has its own cache and so it is possible for a given line of
data to be present in more than one cache.
 When more than one processor is implemented on a single chip, the
configuration is referred to as multiprocessor system.
 This design scheme is used to replicate some of the components of a
single processor so that the processor can execute multiple
threads/processes/tasks concurrently.
2
Cont…d
 This view of the computer is upgraded to the micro-
operation levels, multiple control signals are generated at
the same time.
 Instruction pipelining, at least to the extent of
overlapping fetch and execute operations, has been
around for a long time. Both of these are examples of
performing functions in parallel. This approach is taken
further with superscalar organization, which exploits
instruction-level parallelism.
 With a superscalar machine, there are multiple execution
units within a single processor, and these may execute
multiple instructions from the same program in parallel.
3
Introd… cont…d
 Parallel processing/computing, uses multiple processing
elements simultaneously to solve a problem. This is accomplished
by breaking the problem/task into independent parts so that each
processing element can execute its part of the algorithm
simultaneously with the others.
 The processing elements can be diverse and include resources such
as a single computer with multiple processors, several networked
computers, specialized hardware, or any combination of the above.
 Parallel processing or parallel computing is a form of
computation in which many calculations are carried out
simultaneously, operating on the principle that large problems can
often be divided into smaller ones, which are then solved
concurrently ("in parallel").
4
Introd… cont…d
 A parallel processing system is able to perform concurrent
data processing to achieve faster execution time
 The system may have two or more ALUs and be able to
execute two or more instructions at the same time
 Also, the system may have two or more processors
operating concurrently , the goal is to increase the
throughput – the amount of processing that can be
accomplished during a given interval of time
 A multifunctional organization is usually associated with a
complex control unit to coordinate all the activities among
the various components.
5
Functional units of parallel processing
 Parallel processing can be classified from:
 The internal organization of the processors
 The interconnection structure between processors
 The flow of information through the system
 The number of instructions and data items that are
manipulated simultaneously
 The sequence of instructions read from memory is the
instruction stream
 The operations performed on the data in the processor is
the data stream
• Parallel processing may occur in the instruction stream, the
data stream, or both
6
Eight functional units of CPU
7
Computer classification
8
 A computer can be classified as:
i. Single Instruction Stream, Single Data Stream – SISD
ii. Single Instruction Stream, Multiple Data Stream – SIMD
iii. Multiple Instruction Stream, Single Data Stream – MISD
iv. Multiple Instruction Stream, Multiple Data Stream – MIMD
 SISD -Instructions are executed sequentially. Parallel processing may
be achieved by means of multiple functional units or by pipeline
processing
 SIMD – Includes multiple processing units with a single control unit.All
processors receive the same instruction, but operate on different data.
 MISD-- The same data stream flows through a linear array of processors
executing different instruction streams.
 MIMD – A computer system capable of processing several programs at
the same time.
Pipelining
9
 Pipelining is an implementation technique where multiple
instructions are overlapped in execution.
 The computer pipeline is divided into stages. Each stage
completes a part of an instruction in parallel. The stages are
connected one to the next to form a pipe - instructions enter at
one end, progress through the stages, and exit at the other end.
 Pipelining refers to the technique in which a given task is
divided into a number of subtasks that need to be performed in
sequence. Each subtask is performed by a given functional unit.
The units are connected in a serial fashion and all of them operate
simultaneously. The use of pipelining improves the performance
compared to the traditional sequential execution of tasks.
Pipelining cont…d
10
 In general, pipelining is a technique of decomposing a
sequential process into sub operations, with each sub process
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 partitioned.
The result obtained from the computation in each segment is
transferred to the next segment in the pipeline.The final result
is obtained after the data have passed through all segments.
Example
11
Suppose that we want to perform the combined multiply
and add operations with a stream of numbers.
Ai  Bi + Ci , for i = 1, 2, 3, …, 7
The sub-operations performed in each segment are:
R1 A
← i , R2 B
← i Input Ai and Bi
R3 R1
←  R2, R4 C
← i Multiply and input Ci
R5 R3 + R4
← Add Ci to product
Examples of pipelining process
12
Contents of registers in the above example
13
14
Good Luck !
Q?

Ch-7 COAwrdftghkjnxcvgbdxfhbgfjmgdxghn.pptx

  • 1.
  • 2.
    Introduction  A traditionalway to increase computer system performance is to use multiple processors that can execute in parallel to support a given workload.  The most common multiple-processor organizations is Symmetric Multiprocessors (SMPs).  SMP consists of multiple similar processors within the same computer, interconnected by a bus or some sort of switching arrangement.  Each processor has its own cache and so it is possible for a given line of data to be present in more than one cache.  When more than one processor is implemented on a single chip, the configuration is referred to as multiprocessor system.  This design scheme is used to replicate some of the components of a single processor so that the processor can execute multiple threads/processes/tasks concurrently. 2
  • 3.
    Cont…d  This viewof the computer is upgraded to the micro- operation levels, multiple control signals are generated at the same time.  Instruction pipelining, at least to the extent of overlapping fetch and execute operations, has been around for a long time. Both of these are examples of performing functions in parallel. This approach is taken further with superscalar organization, which exploits instruction-level parallelism.  With a superscalar machine, there are multiple execution units within a single processor, and these may execute multiple instructions from the same program in parallel. 3
  • 4.
    Introd… cont…d  Parallelprocessing/computing, uses multiple processing elements simultaneously to solve a problem. This is accomplished by breaking the problem/task into independent parts so that each processing element can execute its part of the algorithm simultaneously with the others.  The processing elements can be diverse and include resources such as a single computer with multiple processors, several networked computers, specialized hardware, or any combination of the above.  Parallel processing or parallel computing is a form of computation in which many calculations are carried out simultaneously, operating on the principle that large problems can often be divided into smaller ones, which are then solved concurrently ("in parallel"). 4
  • 5.
    Introd… cont…d  Aparallel processing system is able to perform concurrent data processing to achieve faster execution time  The system may have two or more ALUs and be able to execute two or more instructions at the same time  Also, the system may have two or more processors operating concurrently , the goal is to increase the throughput – the amount of processing that can be accomplished during a given interval of time  A multifunctional organization is usually associated with a complex control unit to coordinate all the activities among the various components. 5
  • 6.
    Functional units ofparallel processing  Parallel processing can be classified from:  The internal organization of the processors  The interconnection structure between processors  The flow of information through the system  The number of instructions and data items that are manipulated simultaneously  The sequence of instructions read from memory is the instruction stream  The operations performed on the data in the processor is the data stream • Parallel processing may occur in the instruction stream, the data stream, or both 6
  • 7.
  • 8.
    Computer classification 8  Acomputer can be classified as: i. Single Instruction Stream, Single Data Stream – SISD ii. Single Instruction Stream, Multiple Data Stream – SIMD iii. Multiple Instruction Stream, Single Data Stream – MISD iv. Multiple Instruction Stream, Multiple Data Stream – MIMD  SISD -Instructions are executed sequentially. Parallel processing may be achieved by means of multiple functional units or by pipeline processing  SIMD – Includes multiple processing units with a single control unit.All processors receive the same instruction, but operate on different data.  MISD-- The same data stream flows through a linear array of processors executing different instruction streams.  MIMD – A computer system capable of processing several programs at the same time.
  • 9.
    Pipelining 9  Pipelining isan implementation technique where multiple instructions are overlapped in execution.  The computer pipeline is divided into stages. Each stage completes a part of an instruction in parallel. The stages are connected one to the next to form a pipe - instructions enter at one end, progress through the stages, and exit at the other end.  Pipelining refers to the technique in which a given task is divided into a number of subtasks that need to be performed in sequence. Each subtask is performed by a given functional unit. The units are connected in a serial fashion and all of them operate simultaneously. The use of pipelining improves the performance compared to the traditional sequential execution of tasks.
  • 10.
    Pipelining cont…d 10  Ingeneral, pipelining is a technique of decomposing a sequential process into sub operations, with each sub process 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 partitioned. The result obtained from the computation in each segment is transferred to the next segment in the pipeline.The final result is obtained after the data have passed through all segments.
  • 11.
    Example 11 Suppose that wewant to perform the combined multiply and add operations with a stream of numbers. Ai  Bi + Ci , for i = 1, 2, 3, …, 7 The sub-operations performed in each segment are: R1 A ← i , R2 B ← i Input Ai and Bi R3 R1 ←  R2, R4 C ← i Multiply and input Ci R5 R3 + R4 ← Add Ci to product
  • 12.
  • 13.
    Contents of registersin the above example 13
  • 14.