Docsity

Amdahl’s Law - Parallel Processing Architectures - Lecture Slides, Slides of Parallel Computing and Programming

Toggle sidebar
bg1
Amdahl’s Law and Parallel Computers
•Amdahl’s Law (f: original fraction sequential)
Speedup = 1 / [(f + (1-f)/n] = n/[1+(n-1)f], where
n = No. of processors
•A portion f is sequential => limits parallel speedup
–Speedup <= 1/ f
•Ex. What fraction sequential to get 80X speedup from 100
processors? Assume either 1 processor or 100 fully used
80 = 1 / [(f + (1-f)/100] => f = 0.0025
Only 0.25% sequential! => Must be a highly parallel
program
Docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b

Partial preview of the text

Download Amdahl’s Law - Parallel Processing Architectures - Lecture Slides and more Slides Parallel Computing and Programming in PDF only on Docsity!

Amdahl’s Law and Parallel Computers

  • Amdahl’s Law ( f : original fraction sequential)

Speedup = 1 / [(f + (1-f)/n] = n/[1+(n-1)f], where

n = No. of processors

  • A portion f is sequential => limits parallel speedup
    • Speedup <= 1/ f
  • Ex. What fraction sequential to get 80X speedup from 100

processors? Assume either 1 processor or 100 fully used 80 = 1 / [(f + (1-f)/100] => f = 0.

Only 0.25% sequential! => Must be a highly parallel

program

Popular Flynn Categories

  • SISD (Single Instruction Single Data)
    • Uniprocessors
  • MISD (Multiple Instruction Single Data)
    • ???; multiple processors on a single data stream
  • SIMD (Single Instruction Multiple Data)
    • Examples: Illiac-IV, CM-
      • Simple programming model
      • Low overhead
      • Flexibility
      • All custom integrated circuits
    • (Phrase reused by Intel marketing for media instructions ~ vector)
  • MIMD (Multiple Instruction Multiple Data)
    • Examples: Sun Enterprise 5000, Cray T3D, SGI Origin
      • Flexible
      • Use off-the-shelf micros
  • MIMD current winner: Concentrate on major design emphasis <= 128 processor MIMD machines

Data Parallel Model

  • Operations can be performed in parallel on each

element of a large regular data structure, such

as an array

  • 1 Control Processor (CP) broadcasts to many

PEs. The CP reads an instruction from the

control memory, decodes the instruction, and

broadcasts control signals to all PEs.

  • Condition flag per PE so that can skip
  • Data distributed in each memory
  • Early 1980s VLSI => SIMD rebirth:

32 1-bit PEs + memory on a chip was the PE

  • Data parallel programming languages lay out

data to processor

Classification of Parallel Processors

  • MIMD - True Multiprocessors
    1. Message Passing Multiprocessor - Interprocessor communication through explicit message passing through “send” and “receive operations. EX: IBM SP2, Cray XD1, and Clusters
    2. Shared Memory Multiprocessor – All processors share the same address space. Interprocessor communication through load/store operations to a shared memory. EX: SMP Servers, SGI Origin, HP V-Class, Cray T3E

Their advantages and disadvantages?

Message Passing Model

  • Whole computers (CPU, memory, I/O devices) communicate as explicit I/O operations - Essentially NUMA but integrated at I/O devices vs. memory system
  • Send specifies local buffer + receiving process on remote computer
  • Receive specifies sending process on remote computer + local buffer to place data - Usually send includes process tag and receive has rule on tag: match 1, match any - Synch: when send completes, when buffer free, when request accepted, receive wait for send
  • Send+receive => memory-memory copy, where each supplies local address, AND does pair-wise synchronization!

Shared Address/Memory Multiprocessor

Model

  • Communicate via Load and Store
    • Oldest and most popular model
  • Based on timesharing: processes on multiple processors vs. sharing single processor
  • process: a virtual address space and ~ 1 thread of control - Multiple processes can overlap (share), but ALL threads share a process address space
  • Writes to shared address space by one thread are visible to reads of other threads - Usual model: share code, private stack, some shared heap, some private heap

More Message passing Computers

  • Cluster: Computers connected over high-

bandwidth local area network (Ethernet or

Myrinet) used as a parallel computer

  • Network of Workstations (NOW):

Homogeneous cluster – same type

computers

  • Grid: Computers connected over wide area

network

Advantages message-passing

communication model

  • The hardware can be simpler
  • Communication explicit => simpler to understand; in shared

memory it can be hard to know when communicating and when not, and how costly it is

  • Explicit communication focuses attention on costly aspect of

parallel computation, sometimes leading to improved structure in multiprocessor program

  • Synchronization is naturally associated with sending messages,

reducing the possibility for errors introduced by incorrect synchronization

  • Easier to use sender-initiated communication, which may have

some advantages in performance

Software DSM

  • Advantages: Scalability, get more memory

bandwidth, lower local memory latency

  • Drawback: Longer remote communication

latency, Software model more complex

Major Shared Memory Styles

1. Centralized shared memory ("Uniform

Memory Access" time or "Shared Memory

Processor")

2. Decentralized Shared memory (memory

module with CPU)

  • Advantages: Scalability, get more memory

bandwidth, lower local memory latency

  • Drawback: Longer remote communication

latency, Software model more complex

SMP Interconnect

  • Processors to Memory AND to I/O
  • Bus based: all memory locations equal access

time so SMP = “Symmetric MP”

Can have interleaved memories

Performance limited by bus bandwidth

  • Crossbar based: All memory access times are

equal = SMP

Provides higher bandwidth with interleaved

memories

Difficult to scale due to centralized control

Distributed Shared Memory – Non-Uniform

Shared Memory Access (NUMA)

Scalable, High Perf. Interconnection

Network

  • At Core of Parallel Computer Arch.
  • Requirements and trade-offs at many levels
    • Elegant mathematical structure
    • Deep relationships to algorithm structure
    • Managing many traffic flows
    • Electrical / Optical link properties
  • Little consensus
    • interactions across levels
    • Performance metrics?
    • Cost metrics?
    • Workload?

=> Need holistic understanding M P

CA M P

CA

networkinterface

ScalableInterconnection Network

Performance Metrics: Latency and Bandwidth

1. Bandwidth

  • Need high bandwidth in communication
  • Match limits in network, memory, and processor
  • Challenge is link speed of network interface vs. bisection bandwidth of network

2. Latency

  • Affects performance, since processor may have to wait
  • Affects ease of programming, since requires more thought to overlap communication and computation
  • Overhead to communicate is a problem in many machines

3. Latency Hiding

  • How can a mechanism help hide latency?
  • Increases programming system burden
  • Examples: overlap message send with computation, prefetch data, switch to other tasks