computer architecture and the fetch-execute cycle parallel processor systems

28
Computer Computer Architecture and the Architecture and the Fetch-Execute Cycle Fetch-Execute Cycle Parallel Processor Parallel Processor Systems Systems

Upload: kiley-gilstrap

Post on 14-Dec-2015

231 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Computer Architecture and the Fetch-Execute Cycle Parallel Processor Systems

Computer Architecture and Computer Architecture and the Fetch-Execute Cyclethe Fetch-Execute Cycle

Parallel Processor SystemsParallel Processor Systems

Page 2: Computer Architecture and the Fetch-Execute Cycle Parallel Processor Systems

Learning ObjectivesLearning Objectives

Discuss parallel processing systems (co-processor, parallel processor and array processor), their uses, their advantages and their disadvantages.

Page 3: Computer Architecture and the Fetch-Execute Cycle Parallel Processor Systems

A Von Neumann Architecture A Von Neumann Architecture instruction can be in one of three instruction can be in one of three

phases:phases:

1.1. Fetched (from memory).Fetched (from memory).

2.2. Decoded (by the control unit).Decoded (by the control unit).

3.3. Executed (by the control unit). Executed (by the control unit).

Page 4: Computer Architecture and the Fetch-Execute Cycle Parallel Processor Systems

Disadvantages of Von Neumann Disadvantages of Von Neumann ArchitectureArchitecture

Executes instructions serially.Executes instructions serially.

Limited by the time it takes to process Limited by the time it takes to process each instruction.each instruction.

Some registers are idle (not being used) Some registers are idle (not being used) during the Fetch - Decode - Execute - during the Fetch - Decode - Execute - Reset cycle. Reset cycle.

Page 5: Computer Architecture and the Fetch-Execute Cycle Parallel Processor Systems

PipeliningPipelining

Overlaps the three phases of a Von Neumann Overlaps the three phases of a Von Neumann Architecture instruction and uses idle registers.Architecture instruction and uses idle registers.

Page 6: Computer Architecture and the Fetch-Execute Cycle Parallel Processor Systems

This helps with the speed of throughput unless the This helps with the speed of throughput unless the next instruction in the pipe is not the next one that next instruction in the pipe is not the next one that is needed. is needed. E.g. Instruction 2 is a jump to Instruction 10. E.g. Instruction 2 is a jump to Instruction 10.

Then Instructions 3, 4 and 5 need to be removed from the pipe & Then Instructions 3, 4 and 5 need to be removed from the pipe & Instruction 10 needs to be loaded into the fetch part of the pipe. Instruction 10 needs to be loaded into the fetch part of the pipe.

Thus, the pipe will have to be cleared and the cycle restarted.Thus, the pipe will have to be cleared and the cycle restarted.

Page 7: Computer Architecture and the Fetch-Execute Cycle Parallel Processor Systems

Effect of pipe liningEffect of pipe lining

Three instructions dealt with at the same time.Three instructions dealt with at the same time.Registers no longer idle. Registers no longer idle.

This SHOULD reduce the execution times considerably This SHOULD reduce the execution times considerably (to approximately 1/3 of the standard times), however, (to approximately 1/3 of the standard times), however, this would only be true for a very linear program. this would only be true for a very linear program.

Once jump instructions are introduced the problem Once jump instructions are introduced the problem arises that the wrong instructions are in the pipe line arises that the wrong instructions are in the pipe line waiting to be executed, so every time the sequence of waiting to be executed, so every time the sequence of instructions changes, the pipe line has to be cleared and instructions changes, the pipe line has to be cleared and the process started again.the process started again.

Page 8: Computer Architecture and the Fetch-Execute Cycle Parallel Processor Systems

Parallel Processor SystemsParallel Processor Systems

An alternative to Von Neumann An alternative to Von Neumann Architecture (serial processors) with many Architecture (serial processors) with many independent processors independent processors (or ALUs – see (or ALUs – see

array processor later in this presentationlater in this presentation)) working in working in parallel on the same run of a program / parallel on the same run of a program / job.job.

Page 9: Computer Architecture and the Fetch-Execute Cycle Parallel Processor Systems

Parallel Processing is needed when Parallel Processing is needed when applications are:applications are:

Time sensitive (results are needed in a very Time sensitive (results are needed in a very short period of time).short period of time).

Contain vast quantities of data.Contain vast quantities of data.

Require large amounts of processing / Require large amounts of processing / calculations.calculations.

Processes are interrelated.Processes are interrelated.

Calculations can be done at same time which Calculations can be done at same time which speeds up processing.speeds up processing.

e.g. Weather Forecasting (next slide)e.g. Weather Forecasting (next slide)

Page 10: Computer Architecture and the Fetch-Execute Cycle Parallel Processor Systems

Weather ForecastingWeather Forecasting

Data collected about present conditions to Data collected about present conditions to includeinclude wind / speed / humidity / temperature / wind / speed / humidity / temperature / pressure.pressure.Also details about conditions close to required Also details about conditions close to required location.location.Predictions made (forecast) matched against Predictions made (forecast) matched against actual results.actual results.Hone predictions next time.Hone predictions next time.Data collected by weather balloons / satellites / Data collected by weather balloons / satellites / weather stations.weather stations.

Page 11: Computer Architecture and the Fetch-Execute Cycle Parallel Processor Systems

Types of Types of “Parallel Processing System”“Parallel Processing System”

ProcessorsProcessors

Page 12: Computer Architecture and the Fetch-Execute Cycle Parallel Processor Systems

“Parallel Processing System”Processors

True Parallel Processors

(serial processors in parallel)

Array Processor

(one serial type processor with multiple ALUs)

Coprocessors

((Not general-purposeNot general-purposeprocessors in their own right)processors in their own right)

Maths Coprocessors Floating Point Coprocessors

Page 13: Computer Architecture and the Fetch-Execute Cycle Parallel Processor Systems

TrueTrue Parallel ProcessorParallel Processorss

Many processors to perform a single job / Many processors to perform a single job / program.program. Each processor is a general-purpose Each processor is a general-purpose

processor in its own right.processor in its own right.Serial processors in parallel.Serial processors in parallel.

Used to perform Used to perform anyany task which is a part task which is a part of the entire problem.of the entire problem.

Page 14: Computer Architecture and the Fetch-Execute Cycle Parallel Processor Systems

AnAn Array processorArray processorOne main processor but with many One main processor but with many ALUALUs.s.

Allows a single instruction to be carried out Allows a single instruction to be carried out simultaneously on a number of data locations in simultaneously on a number of data locations in an array and is used to process all the values in an array and is used to process all the values in the array at the same time.the array at the same time.

Note: A kind of sub form of a parallel processing system: not a true parallel Note: A kind of sub form of a parallel processing system: not a true parallel processor as cannot process all tasks which are part of an entire problem, processor as cannot process all tasks which are part of an entire problem, only multiple values in an arrayonly multiple values in an array (e.g. cannot fetch multiple instructions from (e.g. cannot fetch multiple instructions from memory, execute multiple program flow control instructions, do multiple input/output memory, execute multiple program flow control instructions, do multiple input/output operations, etc…).operations, etc…).

Page 15: Computer Architecture and the Fetch-Execute Cycle Parallel Processor Systems

Coprocessor/Coprocessor/ssNot general-purpose processors in their own right Not general-purpose processors in their own right (a kind of sub (a kind of sub form of a parallel processing system)form of a parallel processing system)..

Cannot fetch instructions from memory, execute program flow control Cannot fetch instructions from memory, execute program flow control instructions, do input/output operations, etc…. instructions, do input/output operations, etc…. They require the host main processor to fetch the instructions and handle They require the host main processor to fetch the instructions and handle all other operations aside from the coprocessor’s specific functions. all other operations aside from the coprocessor’s specific functions.

They basically They basically offload the burden of carrying out certain offload the burden of carrying out certain operations from the main processor.operations from the main processor.

There are two types:There are two types:Maths CoprocessorsMaths Coprocessors

Separate units which carry out all mathematical operations.Separate units which carry out all mathematical operations.e.g. e.g. floating point arithmetic, graphics, signal processing, string floating point arithmetic, graphics, signal processing, string processing or encryption.processing or encryption.

Floating Point CoprocessorsFloating Point Coprocessors Separate units which can carry out Separate units which can carry out onlyonly calculations on floating point values. calculations on floating point values.

These only carry out all mathematical operations including floating point These only carry out all mathematical operations including floating point calculations whereas Floating Point Coprocessors can only carry out calculations whereas Floating Point Coprocessors can only carry out floating point calculations but not other mathematical operations.floating point calculations but not other mathematical operations.

Page 16: Computer Architecture and the Fetch-Execute Cycle Parallel Processor Systems

What's a bus?What's a bus?

Early computer buses were literally Early computer buses were literally parallel electrical wires with multiple parallel electrical wires with multiple connections, but the term is now used for connections, but the term is now used for any transmission path.any transmission path.

A wire basically.A wire basically.

Page 17: Computer Architecture and the Fetch-Execute Cycle Parallel Processor Systems

Types of BusesTypes of Buses

1.1. AddressAddress

2.2. DataData

3.3. ControlControl

Page 18: Computer Architecture and the Fetch-Execute Cycle Parallel Processor Systems

1

2

3 4

Address

Address

Data

Data Data

Control

Control

Control

Control

Control

SingleSingle headed headed arrowarrow = = UniUni-directional-directional

DoubleDouble headed headed arrowarrow = = BiBi-directional-directional

Control

Page 19: Computer Architecture and the Fetch-Execute Cycle Parallel Processor Systems

http://en.wikipedia.org/wiki/File:Computer_system_bus.svg

Page 20: Computer Architecture and the Fetch-Execute Cycle Parallel Processor Systems

Types of BusesTypes of Buses

1.1. AddressAddress Carries the address of a memory location.Carries the address of a memory location.

e.g. Address of location in memory from MAR.e.g. Address of location in memory from MAR.

2.2. DataData To carry data from one location to another in To carry data from one location to another in

processor.processor.e.g. from MDR to CIRe.g. from MDR to CIR

3.3. ControlControl Carries control signals around processor to Carries control signals around processor to

synchronise the operation of the processor synchronise the operation of the processor components.components.

e.g. Memory read/write completed.e.g. Memory read/write completed. In reality there are many lines/wires and each line carries a In reality there are many lines/wires and each line carries a

different signal.different signal.

Page 21: Computer Architecture and the Fetch-Execute Cycle Parallel Processor Systems

PlenaryPlenary

How does pipelining speed up the processing done by a computer?

Page 22: Computer Architecture and the Fetch-Execute Cycle Parallel Processor Systems

PlenaryPlenary

All instructions have three phases which are treated separately, by different parts of the processor so that more than one instruction can be being dealt with simultaneously.

Page 23: Computer Architecture and the Fetch-Execute Cycle Parallel Processor Systems

PlenaryPlenary

What type of instruction would cause the pipeline system to be reset and why?

Page 24: Computer Architecture and the Fetch-Execute Cycle Parallel Processor Systems

PlenaryPlenary

Jump instruction The instructions in the pipeline are no longer

the ones to be dealt with next so the pipeline has to be reset.

Page 25: Computer Architecture and the Fetch-Execute Cycle Parallel Processor Systems

PlenaryPlenary

How does parallel processing differ from serial processing?

Page 26: Computer Architecture and the Fetch-Execute Cycle Parallel Processor Systems

PlenaryPlenary

Many processors are used simultaneously all doing some processing required by the application.

Special non-linear programs must be produced.

Page 27: Computer Architecture and the Fetch-Execute Cycle Parallel Processor Systems

PlenaryPlenary

Why is parallel architecture needed when processing some simulations? Give an example application.

Page 28: Computer Architecture and the Fetch-Execute Cycle Parallel Processor Systems

Parallel Processing is needed when Parallel Processing is needed when applications are:applications are:

Time sensitive (results are needed in a very Time sensitive (results are needed in a very short period of time).short period of time).

Contain vast quantities of data.Contain vast quantities of data.

Require large amounts of processing / Require large amounts of processing / calculations.calculations.

Processes are interrelated.Processes are interrelated.

Calculations can be done at same time which Calculations can be done at same time which speeds up processing.speeds up processing.

e.g. Weather Forecasting.e.g. Weather Forecasting.