22
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

Computer Architecture

Embed Size (px)

Citation preview

Page 1: Computer Architecture

1

Seminar onSequential, Pipeline concept with

state diagram and Parallel processing

Presented by H M Shahriar Parvez

Master of Computer ScienceUniversity of Malaya

Moderator: Dr. Shivakumara Palaiahnakote

Page 2: Computer Architecture

2

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

Page 3: Computer Architecture

3

Sequential Processing: von Neumann architecture

Page 4: Computer Architecture

4

Sequential Processing: Harvard architecture vs Princeton architecture

It aims to avoid the “von Neumann bottleneck” (the singlepath to memory for accessing both instructions and data) + Cache

Page 5: Computer Architecture

5

•Are we satisfied enough with the CPU Performance ?

Page 6: Computer Architecture

6

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.

Page 7: Computer Architecture

7

Building a Car- UnpipelinedOn Road

24 hours

24 hours

24 hours

Throughput= 1 car/24 hours

Jobs

Time

Page 8: Computer Architecture

8

Pipelined Model- Break the jobs into smaller stages

A B CA B C

A B C

8 hours

Engine

Jobs

Body Paint

Throughput= 1 car/8 hoursTime

Page 9: Computer Architecture

9

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.

Page 10: Computer Architecture

10

Advantages/DisadvantagesAdvantages: • 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.

Page 11: Computer Architecture

11

From Non-Linear Pipeline to State

Diagram

Page 12: Computer Architecture

12

Non-Linear Pipeline Consider the following nonlinear pipeline-

Page 13: Computer Architecture

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)

Page 14: Computer Architecture

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 – 000110Logically 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 )

Page 15: Computer Architecture

15

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)

Page 16: Computer Architecture

16

Step 3- State Diagram • Based on the calculation , the desire state diagram is :

Minimum Average Latency

MAL= (2+5)/2 = 3.5

Page 17: Computer Architecture

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

Page 18: Computer Architecture

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.

Page 19: Computer Architecture

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.

Page 20: Computer Architecture

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

Page 21: Computer Architecture

21

Taxonomy of Parallel Processor Architectures

Page 22: Computer Architecture

22

Thank you for listening

Any Question