
























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

























Except as otherwise noted, the content of this presentation is licensed under the Creative Commons Attribution 2.5 license
.
Orders of magnitude, Recurrences
CS
lecture 1
Dense, sparse matrix algorithms
Sorting
Graph Algorithms
N body problem
Searching
(
Branch and bound,
Backtrack, Dynamic Programming)
Fast Fourier Transform
Off the shelf, commodity processors are very fast
Memory is very cheap Building a processor that is a small factor faster
CS
lecture 1
Building a processor that is a small factor faster costs an order of magnitude more
Clusters:
NoW is the time!
Cheapest way to get more performance: multiprocessor
NoW: Networks of workstations
Workstation can be an SMP
SMP: Symmetric Multi Processor
Shared memory,
Bus or Crossbar (eg. Cray)
Get a lot of the fastest processors
Get a lot of memory per processor
Get the fastest network
CS
lecture 1
Get the fastest network
Hook it all together
And then what ???
Problem with Wile E. Coyote Architecture^ Von Neumann Machines not built for //ism
To get high speed, processors have
lots of state
Cache, stack, global memory
To tolerate latency, we need
fast context switch.
WHY?
No free lunch:
can’t have both
CS
lecture 1
No free lunch:
can’t have both
Certainly not if the processor was not designed for both
Memory wall: memory gets slower and slower
in terms of number of cycles it takes to access
Memory hierarchy gets more and more complex
Memory accesses block
No split phase memory access
BUT
that’s still what we use,
WHY?
Use efficient sequential algorithms
Maximize parallelism
CS
lecture 1
Minimize overhead
synchronization, remote accesses
Efficiency is Architecture Dependent
Minimize time, space
Efficiency is portable
Efficient program on Pentium ~ Efficient program on Opteron
Implicit parallel programming: Super Compilers^
Compiler extracts parallelism from
sequential code
Distributes data, creates and schedules
tasks
Complication:
side effects:
CS
lecture 1
the sequential order of reads and writes to a memorylocation determines the program outcome
a parallelizing compiler must obey the sequential order ofside effecting statements and still create //ism
pointers, aliases, indirect array reference make analyzingwhich statements access which locations hard or impossible
years of compiler research has not brought much result.
Implicit parallel programming cont’
Simple, clean case: Functional Programming (FP)
Functions:
no side effects
, order of execution less constrained
F ( P(x,y), Q(y,z) )
P and Q can be executed
in parallel
F ( P(x,y), Q(y,z) )
P and Q can be executed
in parallel
Simple
single assigment
memory model
: no pointers, no
write after read or write after write hazards (dataflowsemantics)
FP was long doomed too high level too inefficient,because the simple memory model causes lots of copies
FP
is coming back:
MapReduce
approach in data
centers (Google) is a data parallel functional paradigm
CS
lecture 1
3000300011 cubic miles
.1.1.1 cubic mile:
11
segments
CS
lecture 1
half hour time steps: ~ 100
time steps
Temp, Pressure, Humidity, Wind speed, Wind direction for each time step in each segment
Assume ~ 100 FLOPs per time step per segment
Computational requirement: 10
15
FLOPs
assume one FLOP per clock cycle
CS
lecture 1
assume one FLOP per clock cycle
Fast serial computer:
4
GHz
Total serial time: 25*
4
sec ~
70
hours
Not too good for
48
hour weather
prediction
Attract each other: Gravitational forceNewtons law O(n*n) calculations per “snapshot”
CS
lecture 1
O(n*n) calculations per “snapshot”
Galaxy: ~ 10
11
bodies
->
~ 10
22
calculations
Calculation 1 micro sec
Snapshot: 10
16
secs = ~
11
days = ~ 3*
8
years
Is parallelism going to help us? NO
What
does
help? Better algorithm: Barnes Hut
Divides the space in “quad tree”
Treats “far’ away
quads as one body
Pollution levels, Remote sensing of materials Image recognition
CS
lecture 1
Image recognition
Planning, Scheduling, VLSI design
Example: 1D 1024 FFT
General purpose machine (G4):
25 micro secs
ASIC device (MIT Lincoln Labs): 32 nano secs
CS
lecture 1
ASIC device (MIT Lincoln Labs): 32 nano secs
ASIC device uses 20 milliwatts (100 * less power)
2 tera ops
in small ( < cubic ft ) device
Target applications
FFT
Finite Impulse Response (FIR) Filters
Matrix multiply
QR decomposition
Introduction to Algorithms by
CS
lecture 1
Introduction to Algorithms by
Cormen, Leiserson, Rivest and Stein
Or go online
Introduction
Growth of functions
Summations
Recurrences