Seminar on
Sequential, Pipeline concept with state
diagram and Parallel processing
Presented by
H M Shahriar Parvez
Master of Computer Science
University of Malaya
Moderator: Dr. Shivakumara Palaiahnakote
1
Sequential Processing
• Sequential processing is a term used to describe the processing that
occurs in the order that it is received.
• Why we mention von Neumann architecture?
• Although many enhancements have been made over the years to the
original idea, almost every processor available today is descended
from — and owes much of its architecture to — the original von
Neumann architecture
• The von Neumann architecture, also known as the Princeton
architecture because John von Neumann was a researcher at
Princeton University’s Institute for Advanced Studies
2
Sequential Processing: von Neumann
architecture
3
Sequential Processing: Harvard architecture vs
Princeton architecture
It aims to avoid the “von
Neumann bottleneck”
(the single
path to memory for
accessing both
instructions and data) +
Cache
4
•Are we satisfied enough with the CPU
Performance ?
5
Pipeline
• Is a technique used to improve the execution throughput of a CPU by
using the processor resources in order to maximize the CPU
performance.
• Is a series of stages, where some work is done at each stage. The
work is not finished until it has passed through all stages.
• With pipelining, the computer architecture allows the next
instructions to be fetched while the processor is performing
arithmetic operations, holding them in a buffer close to the processor
until each instruction operation can performed.
6
Building a Car- Unpipelined
On Road
24 hours
24 hours
24 hours
Throughput= 1 car/24 hours
Jobs
Time 7
Pipelined Model- Break the jobs into smaller
stages
A B C
A B C
A B C
8 hours
Engine
Jobs
Body Paint
Throughput= 1 car/8 hoursTime
8
Why pipelining
• When machine process one instruction at a time (fetching), the ALU
remains lazy.
• Until one instruction is not finished to pass the three stages of
processing instruction: Fetch-Decode-Execution, CPU does not take
another instruction to execute.
• The goal is to keep all of these component as busy as possible.
• A pipelined processor will start fetching the next instruction from
memory as soon as it has latched the current instruction in the
instruction register.
9
Advantages/Disadvantages
Advantages:
• More efficient use of processor
• Quicker time of execution of large number of instructions
Disadvantages:
• Design difficulties and high cost.
• In pipeline processor, insertion of flip-flops between
modules increase the instruction latency.
• Inability to continuously run the pipeline at full speed
because of pipeline hazards which disrupt the smooth
execution of the pipeline.
10
From Non-Linear Pipeline to
State Diagram
11
Non-Linear Pipeline
Consider the following nonlinear pipeline-
12
Step1- Reservation Table
• The reservation table for this pipeline is :
t0 t1 t2 t3 t4 t5
Stage 1 X
Stage-2 X X X
Stage-3 X X
Collision
Stage
From this reservation table
Forbidden latencies are
(0,1,3,4)
13
Step2- Collision Vector (CV)
C5 C4 C3 C2 C1 C0
• Collision Vector C= 0 1 1 0 1 1 *Forbidden latency represents 1
Allowable latency represents 0
Here, Allowable latency (2,5)
for allowable latency, i =2
Shifting the bits two places right yields – 000110
Logically OR ing the value with Initial CV gives - 0 1 1 0 1 1
0 0 0 1 1 0
0 1 1 1 1 1 (A new state )
14
Step 2- Collision Vector (Contd.)
Similarly for i =5 or greater,
Logically shifting 5 bits to right yields – 000000
OR ing with the initial CV will only give the same state
i.e 011011
OR 000000
011011 (Same initial State)
15
Step 3- State Diagram
• Based on the calculation , the desire state diagram is :
Minimum Average Latency
MAL= (2+5)/2
= 3.5
16
Parallel Processing System
• The sequential execution is an
approach that forms the basis of
the von Neumann machine cycle is
very simple and very effective, but
the major disadvantages of it are :
• it does not make very efficient use of
the hardware.
• Executing a single machine
instruction requires several steps:
fetch the instruction from memory,
decode it, retrieve its operands,
perform the operation it specifies,
and store its result.
• It consume/take more time to
execute one operation
• In pipeline, single
job/instructions/operations is split
into many in order to increase the
speed. But it is major
disadvantages are:
• There are implementation problems
• Design difficulty and cost, the design
of a non-pipelined processor simpler
and cheaper to manufacture
• In pipelined processor, insertion of
flip flops between modules increases
the instruction latency
• Still the speed is not optimal and
increasing the speed is also another
issue
Sequential processing Pipeline
17
Parallel Processing System
• Parallel processing systems a Systems which include more than one
processor is considered to be parallel systems.
• Here the term is not used in its strict geometrical sense (coplanar lines that
do not intersect), but rather to describe two or more pieces of hardware that
work together, being simultaneously engaged in the same (or related) tasks.
• They are parallel in the sense of being independent but going in the same
direction.
• Perhaps a more accurate description of such a system would be concurrent
or cooperative processing, but the use of the term parallel processing is
long established and unlikely to change.
• parallel processing differs from multitasking, in which a single CPU
executes several programs at once.
• Parallel systems deal with the simultaneous use of multiple computer
resources that can include a single computer with multiple processors, a
number of computers connected by a network to form a parallel processing
cluster or a combination of both.
18
Parallel Processing System
• The simultaneous use of more than one CPU to execute a program.
• Ideally, parallel processing makes a program run faster because there are more
engines (CPUs) running it.
• Parallel Processing Systems are designed to speed up the execution of programs by
dividing the program into multiple fragments and processing these fragments
simultaneously.
• Such systems are multiprocessor systems also known as tightly coupled systems.
• Most computers have just one CPU, but some models have several. There are even
computers with thousands of CPUs.
• With single-CPU computers, it is possible to perform parallel processing by
connecting the computers in a network.
• In practice, it is often difficult to divide a program in such a way that separate
CPUs can execute different portions without interfering with each other.
• However, this type of parallel processing requires very sophisticated software
called distributed processing software.
19
Multiple Processor Organization
• Set of processors
• Simultaneously execute different
instruction sequences
• Different sets of data
• SMPs, clusters and NUMA
Multiple instruction, multiple data stream- MIMD
20
Taxonomy of Parallel Processor Architectures
21
Thank you for listening
Any Question
22

Computer Architecture

  • 1.
    Seminar on Sequential, Pipelineconcept with state diagram and Parallel processing Presented by H M Shahriar Parvez Master of Computer Science University of Malaya Moderator: Dr. Shivakumara Palaiahnakote 1
  • 2.
    Sequential Processing • Sequentialprocessing is a term used to describe the processing that occurs in the order that it is received. • Why we mention von Neumann architecture? • Although many enhancements have been made over the years to the original idea, almost every processor available today is descended from — and owes much of its architecture to — the original von Neumann architecture • The von Neumann architecture, also known as the Princeton architecture because John von Neumann was a researcher at Princeton University’s Institute for Advanced Studies 2
  • 3.
    Sequential Processing: vonNeumann architecture 3
  • 4.
    Sequential Processing: Harvardarchitecture vs Princeton architecture It aims to avoid the “von Neumann bottleneck” (the single path to memory for accessing both instructions and data) + Cache 4
  • 5.
    •Are we satisfiedenough with the CPU Performance ? 5
  • 6.
    Pipeline • Is atechnique used to improve the execution throughput of a CPU by using the processor resources in order to maximize the CPU performance. • Is a series of stages, where some work is done at each stage. The work is not finished until it has passed through all stages. • With pipelining, the computer architecture allows the next instructions to be fetched while the processor is performing arithmetic operations, holding them in a buffer close to the processor until each instruction operation can performed. 6
  • 7.
    Building a Car-Unpipelined On Road 24 hours 24 hours 24 hours Throughput= 1 car/24 hours Jobs Time 7
  • 8.
    Pipelined Model- Breakthe jobs into smaller stages A B C A B C A B C 8 hours Engine Jobs Body Paint Throughput= 1 car/8 hoursTime 8
  • 9.
    Why pipelining • Whenmachine process one instruction at a time (fetching), the ALU remains lazy. • Until one instruction is not finished to pass the three stages of processing instruction: Fetch-Decode-Execution, CPU does not take another instruction to execute. • The goal is to keep all of these component as busy as possible. • A pipelined processor will start fetching the next instruction from memory as soon as it has latched the current instruction in the instruction register. 9
  • 10.
    Advantages/Disadvantages Advantages: • More efficientuse of processor • Quicker time of execution of large number of instructions Disadvantages: • Design difficulties and high cost. • In pipeline processor, insertion of flip-flops between modules increase the instruction latency. • Inability to continuously run the pipeline at full speed because of pipeline hazards which disrupt the smooth execution of the pipeline. 10
  • 11.
    From Non-Linear Pipelineto State Diagram 11
  • 12.
    Non-Linear Pipeline Consider thefollowing nonlinear pipeline- 12
  • 13.
    Step1- Reservation Table •The reservation table for this pipeline is : t0 t1 t2 t3 t4 t5 Stage 1 X Stage-2 X X X Stage-3 X X Collision Stage From this reservation table Forbidden latencies are (0,1,3,4) 13
  • 14.
    Step2- Collision Vector(CV) C5 C4 C3 C2 C1 C0 • Collision Vector C= 0 1 1 0 1 1 *Forbidden latency represents 1 Allowable latency represents 0 Here, Allowable latency (2,5) for allowable latency, i =2 Shifting the bits two places right yields – 000110 Logically OR ing the value with Initial CV gives - 0 1 1 0 1 1 0 0 0 1 1 0 0 1 1 1 1 1 (A new state ) 14
  • 15.
    Step 2- CollisionVector (Contd.) Similarly for i =5 or greater, Logically shifting 5 bits to right yields – 000000 OR ing with the initial CV will only give the same state i.e 011011 OR 000000 011011 (Same initial State) 15
  • 16.
    Step 3- StateDiagram • Based on the calculation , the desire state diagram is : Minimum Average Latency MAL= (2+5)/2 = 3.5 16
  • 17.
    Parallel Processing System •The sequential execution is an approach that forms the basis of the von Neumann machine cycle is very simple and very effective, but the major disadvantages of it are : • it does not make very efficient use of the hardware. • Executing a single machine instruction requires several steps: fetch the instruction from memory, decode it, retrieve its operands, perform the operation it specifies, and store its result. • It consume/take more time to execute one operation • In pipeline, single job/instructions/operations is split into many in order to increase the speed. But it is major disadvantages are: • There are implementation problems • Design difficulty and cost, the design of a non-pipelined processor simpler and cheaper to manufacture • In pipelined processor, insertion of flip flops between modules increases the instruction latency • Still the speed is not optimal and increasing the speed is also another issue Sequential processing Pipeline 17
  • 18.
    Parallel Processing System •Parallel processing systems a Systems which include more than one processor is considered to be parallel systems. • Here the term is not used in its strict geometrical sense (coplanar lines that do not intersect), but rather to describe two or more pieces of hardware that work together, being simultaneously engaged in the same (or related) tasks. • They are parallel in the sense of being independent but going in the same direction. • Perhaps a more accurate description of such a system would be concurrent or cooperative processing, but the use of the term parallel processing is long established and unlikely to change. • parallel processing differs from multitasking, in which a single CPU executes several programs at once. • Parallel systems deal with the simultaneous use of multiple computer resources that can include a single computer with multiple processors, a number of computers connected by a network to form a parallel processing cluster or a combination of both. 18
  • 19.
    Parallel Processing System •The simultaneous use of more than one CPU to execute a program. • Ideally, parallel processing makes a program run faster because there are more engines (CPUs) running it. • Parallel Processing Systems are designed to speed up the execution of programs by dividing the program into multiple fragments and processing these fragments simultaneously. • Such systems are multiprocessor systems also known as tightly coupled systems. • Most computers have just one CPU, but some models have several. There are even computers with thousands of CPUs. • With single-CPU computers, it is possible to perform parallel processing by connecting the computers in a network. • In practice, it is often difficult to divide a program in such a way that separate CPUs can execute different portions without interfering with each other. • However, this type of parallel processing requires very sophisticated software called distributed processing software. 19
  • 20.
    Multiple Processor Organization •Set of processors • Simultaneously execute different instruction sequences • Different sets of data • SMPs, clusters and NUMA Multiple instruction, multiple data stream- MIMD 20
  • 21.
    Taxonomy of ParallelProcessor Architectures 21
  • 22.
    Thank you forlistening Any Question 22