lecture 5 - multiprocessors

29
Multiprocessors COMP 211 – Computer Systems Or ganizati on and Architecture ACL 201302!

Upload: bryan-mendoza

Post on 22-Feb-2018

218 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Lecture 5 - Multiprocessors

7/24/2019 Lecture 5 - Multiprocessors

http://slidepdf.com/reader/full/lecture-5-multiprocessors 1/29

MultiprocessorsCOMP 211 – Computer Systems Organization and Architecture

ACL 201302!

Page 2: Lecture 5 - Multiprocessors

7/24/2019 Lecture 5 - Multiprocessors

http://slidepdf.com/reader/full/lecture-5-multiprocessors 2/29

"ntroduction

  As their name suggest, multiprocessor systemsutilizes more than one processor to improveperformance.

  Early multiprocessor systems used multiple

processor to improve throughput by executingindependent jobs on different processors.

Page 3: Lecture 5 - Multiprocessors

7/24/2019 Lecture 5 - Multiprocessors

http://slidepdf.com/reader/full/lecture-5-multiprocessors 3/29

"ntroduction

Dividing a single program’s wor among multipleprocessors, multiprocessors can achieve greaterperformance than is possible with a singleprocessor in any given fabrication technology.

!he terms multitasing or multiprogramming aremore appropriate to describe this concept, which isimplemented mostly in software, whereasmultiprocessing is more appropriate to describe the

use of multiple hardware "#$s. A system can beboth multiprocessing and multiprogramming, onlyone of the two, or neither of the two of them.

Page 4: Lecture 5 - Multiprocessors

7/24/2019 Lecture 5 - Multiprocessors

http://slidepdf.com/reader/full/lecture-5-multiprocessors 4/29

VS

Page 5: Lecture 5 - Multiprocessors

7/24/2019 Lecture 5 - Multiprocessors

http://slidepdf.com/reader/full/lecture-5-multiprocessors 5/29

Multi core

a single computing component with two or moreindependent actual central processing units %called&cores&', which are the units that read and executeprogram instructions.

Page 6: Lecture 5 - Multiprocessors

7/24/2019 Lecture 5 - Multiprocessors

http://slidepdf.com/reader/full/lecture-5-multiprocessors 6/29

Multiprocessor

  (t is a tightly coupled computer systemhaving two or more processing units %MultipleProcessors' each sharing main memory andperipherals, in order to simultaneously process

programs.

Page 7: Lecture 5 - Multiprocessors

7/24/2019 Lecture 5 - Multiprocessors

http://slidepdf.com/reader/full/lecture-5-multiprocessors 7/29

  Designer of uniprocessor systems, measureperformance in terms of speedup.

  )imilarly, multiprocessor architects measureperformance in terms of speedup.

Microprocessors Speedup

Page 8: Lecture 5 - Multiprocessors

7/24/2019 Lecture 5 - Multiprocessors

http://slidepdf.com/reader/full/lecture-5-multiprocessors 8/29

Microprocessors Speedup

Page 9: Lecture 5 - Multiprocessors

7/24/2019 Lecture 5 - Multiprocessors

http://slidepdf.com/reader/full/lecture-5-multiprocessors 9/29

Linear Speedup!he execution time of program on an n*

processor system would be 1/nth  of the executiontime on a one*processor system

Super Linear Speedup(t occurs when programs are sometimes more

efficient on multiprocessor systems than onuniprocessor systems.

"deal Microprocessors Speedup

Page 10: Lecture 5 - Multiprocessors

7/24/2019 Lecture 5 - Multiprocessors

http://slidepdf.com/reader/full/lecture-5-multiprocessors 10/29

 (nterprocessor communication

 )ynchronization

 +oad alancing

Limitations o# Speedup

Page 11: Lecture 5 - Multiprocessors

7/24/2019 Lecture 5 - Multiprocessors

http://slidepdf.com/reader/full/lecture-5-multiprocessors 11/29

"nterprocessor communication

 -henever one processor generates %computes' avalue that is needed by the fraction of the programrunning on another processor, that value must be

communicated to the processors that need it, whichtaes time

  n a uniprocessor system, the entire program

runs on one processor, so there is no timelost to interprocessor communication

Limitations o# Speedup

Page 12: Lecture 5 - Multiprocessors

7/24/2019 Lecture 5 - Multiprocessors

http://slidepdf.com/reader/full/lecture-5-multiprocessors 12/29

Synchronization

 (t is often necessary to synchronize the processorsto ensure that they have all completed some phaseof the program before any processor begins woring

on the next phase of the program.

Limitations o# Speedup

Page 13: Lecture 5 - Multiprocessors

7/24/2019 Lecture 5 - Multiprocessors

http://slidepdf.com/reader/full/lecture-5-multiprocessors 13/29

Load $alancing

 (n many parallel applications, it is difficult to dividethe program across the processors such that eachprocessor’s chun of the wor tae the same amount

of time.

 )ome of the processor’s completes their tas earlyand are idle waiting for the others to finish.

This results in increasing the overallexecution time.

Limitations o# Speedup

Page 14: Lecture 5 - Multiprocessors

7/24/2019 Lecture 5 - Multiprocessors

http://slidepdf.com/reader/full/lecture-5-multiprocessors 14/29

/ultiprocessors consist of processors connectedby a communications networ.

Multiprocessor Systems

"#$ "#$ "#$ "#$

"#$ "#$ "#$ "#$

0etwor

Page 15: Lecture 5 - Multiprocessors

7/24/2019 Lecture 5 - Multiprocessors

http://slidepdf.com/reader/full/lecture-5-multiprocessors 15/29

ASS"%&'

A()hat is multithreading*

Ad+antage and disad+antage$( %i+en ,ypes O# Multiprocessors' -t.ocolumns/

1(PO" "LL4S,A,"O&2(%" A,LAS, ,)O 5AMPLS AC6

Page 16: Lecture 5 - Multiprocessors

7/24/2019 Lecture 5 - Multiprocessors

http://slidepdf.com/reader/full/lecture-5-multiprocessors 16/29

 "entralized /emory )ystem

 Distributed /emory )ystem

,ypes o# Multiprocessors

Page 17: Lecture 5 - Multiprocessors

7/24/2019 Lecture 5 - Multiprocessors

http://slidepdf.com/reader/full/lecture-5-multiprocessors 17/29

!here is only one memory system for the entire

multiprocessor, and memory references from all ofthe processors go to that memory system.

Centralized Memory System

"#$

"#$

"#$

"#$

"#$

"#$

"#$

0etwor

/emory

Page 18: Lecture 5 - Multiprocessors

7/24/2019 Lecture 5 - Multiprocessors

http://slidepdf.com/reader/full/lecture-5-multiprocessors 18/29

 Advantages:

  All data in the memory is accessible by allprocessors!here will never be a problem with multiplecopies of a given datum.

  (t is a better design when the number ofprocessors in the system is small.A single memory may be able to meet thebandwidth demands of the processors.

Disadvantage:!he bandwidth does not increase as thenumber of processors increase.

Centralized Memory System

Page 19: Lecture 5 - Multiprocessors

7/24/2019 Lecture 5 - Multiprocessors

http://slidepdf.com/reader/full/lecture-5-multiprocessors 19/29

Each processor has its own memory system,

which it can access directly. (n obtaining the datathat is stored in some other processor’s memory, aprocessor must communicate with it to re1uest thedata.

istri7uted Memory System

0etwor

/emory /emory /emory /emory

"#$ "#$ "#$ "#$

"#$ "#$ "#$ "#$

/emory /emory /emory /emory

Page 20: Lecture 5 - Multiprocessors

7/24/2019 Lecture 5 - Multiprocessors

http://slidepdf.com/reader/full/lecture-5-multiprocessors 20/29

 Advantages:

 Each processor has its own memory system.  !here is more total bandwidth in the memorysystem than in a centralized memory system, andthat the latency to complete a memory re1uest is

lower.  $sed when the latency of the networ isunacceptably long enough for the "/) to handle.

Disadvantage: nly some of the data in the memoryis directly accessible by each processor, since aprocessor can only read and write itslocal memory system.

istri7uted Memory System

Page 21: Lecture 5 - Multiprocessors

7/24/2019 Lecture 5 - Multiprocessors

http://slidepdf.com/reader/full/lecture-5-multiprocessors 21/29

Page 22: Lecture 5 - Multiprocessors

7/24/2019 Lecture 5 - Multiprocessors

http://slidepdf.com/reader/full/lecture-5-multiprocessors 22/29

  (t is structured as a set of communicating

processes, with no shared mutable state.

  (t can involve rendezvous between sender andreceiver.

Synchronous – Sender waits for receiver  Asynchronous – Sender continues immediately

after sending a message

 (t allows easy system upgrade

Message8Passing Systems

Page 23: Lecture 5 - Multiprocessors

7/24/2019 Lecture 5 - Multiprocessors

http://slidepdf.com/reader/full/lecture-5-multiprocessors 23/29

  (t can provide a single address space that all of

the processors can read and write.

 !he communications happen is implicit.

 !he memory system handles inter*processorcommunication by allowing all processors tosee data written by any processor.

Shared8Memory Systems

Page 24: Lecture 5 - Multiprocessors

7/24/2019 Lecture 5 - Multiprocessors

http://slidepdf.com/reader/full/lecture-5-multiprocessors 24/29

 Defines when memory operations executed on one

processor become visible on other processors.

!wo "onsistency /odels )trong "onsistency

* dictates that the memory system act exactlyas if there were only one memory in the computerthat different processors tae turns using.

 2elaxed "onsistency* allowing different processors to have different

values for a given datum until the program re1ueststhat all memories made consistent.

Memory Consistency Models

Page 25: Lecture 5 - Multiprocessors

7/24/2019 Lecture 5 - Multiprocessors

http://slidepdf.com/reader/full/lecture-5-multiprocessors 25/29

  (t defines how data can be shared and replicated

across processors.

  (t also defines the specific set of actions that areexecuted to eep each processor’s view of memory

system consistent.

Cache Coherence

Page 26: Lecture 5 - Multiprocessors

7/24/2019 Lecture 5 - Multiprocessors

http://slidepdf.com/reader/full/lecture-5-multiprocessors 26/29

Page 27: Lecture 5 - Multiprocessors

7/24/2019 Lecture 5 - Multiprocessors

http://slidepdf.com/reader/full/lecture-5-multiprocessors 27/29

 Advantage:  /emory references can actually complete faster

if some other processors has a copy of the re1uiredline

Disadvantage:  !he bandwidth available over the bus does not

grow as the number of processors in the systemincreases.

Page 28: Lecture 5 - Multiprocessors

7/24/2019 Lecture 5 - Multiprocessors

http://slidepdf.com/reader/full/lecture-5-multiprocessors 28/29

$us87ased Shared8Memory System

Processor

Cache

Processor

Cache

Processor

Cache

Processor

Cache

MA"& MMO9

Memory $us Memory $us

Page 29: Lecture 5 - Multiprocessors

7/24/2019 Lecture 5 - Multiprocessors

http://slidepdf.com/reader/full/lecture-5-multiprocessors 29/29

 ASSIGNMENT:

WHAT IS SISD, MISD, SIMD, MIMD (PROVIDE

ILLUSTRATION