Docsity

Parallel Processor Architecture & Algorithms: MIT 6.006 Notes, Lecture notes of Computer science

Toggle sidebar
bg1
Lecture 24 Beyond 6.006 6.006 Fall 2011
Lecture 24: Parallel Processor Architecture &
Algorithms
Processor Architecture
Computer architecture has evolved:
• Intel 8086 (1981): 5 MHz (used in first IBM PC)
• Intel 80486 (1989): 25 MHz (became i486 because of a court ruling that prohibits the
trademarking of numbers)
• Pentium (1993): 66 MHz
• Pentium 4 (2000): 1.5 GHz (deep ≈ 30-stage pipeline)
• Pentium D (2005): 3.2 GHz (and then the clock speed stopped increasing)
• Quadcore Xeon (2008): 3 GHz (increasing number of cores on chip is key to perfor-
mance scaling)
Processors need data to compute on:
DRAM
SRAM
fast slow
P P
PP
Problem: SRAM cannot support more than ≈ 4 memory requests in parallel.
1
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Parallel Processor Architecture & Algorithms: MIT 6.006 Notes and more Lecture notes Computer science in PDF only on Docsity!

Lecture 24: Parallel Processor Architecture &

Algorithms

Processor Architecture

Computer architecture has evolved:

  • Intel 8086 (1981): 5 MHz (used in first IBM PC)
  • Intel 80486 (1989): 25 MHz (became i486 because of a court ruling that prohibits the trademarking of numbers)
  • Pentium (1993): 66 MHz
  • Pentium 4 (2000): 1. 5 GHz (deep ≈ 30-stage pipeline)
  • Pentium D (2005): 3. 2 GHz (and then the clock speed stopped increasing)
  • Quadcore Xeon (2008): 3 GHz (increasing number of cores on chip is key to perfor mance scaling)

Processors need data to compute on:

DRAM

SRAM

fast

slow

P P

P P

Problem: SRAM cannot support more than ≈ 4 memory requests in parallel.

$: cache P: processor

P $

P $

P $

P $

P $

P $

P $

P $

P $

Most of the time program running on the processor accesses local or “cache” memory

Every once in a while, it accesses remote memory:

P

$

P

$

data

request

(addr)

data

Round-trip required to obtain data

Problem

Decide when to migrate to minimize total memory cost of trace For example:

Example: p 1 p 2 p 2 p 1 p 1 p 3 p 2

start at p 1 migrate to p (^2)

migrate to p (^1)

remote access

remote access

local accesses

costs

What can we use to solve this problem? Dynamic Programming!

Dynamic Programming Solution

Program at p, initially, number of processors = Q

Subproblems?

Define DP (k, pi) as cost of optimal solution for the prefix m 1 ,... , mk of memory accesses when program starts at p 1 and ends up at pi.

DP (k + 1, p^ DP^ (k,^ pj^ )^ +^ costaccess^ (pj,^ p(mk+1))^ if^ pj=^ p(mk+1) j ) =^ M IN i

Q =1(DP^ (k,^ pi)^ +^ costmig(pi,^ pj))^ if^ pj^ =^ p(mk+1)

Complexity?

O( N ' · Q' · (^) ' Q (^) ' ) = O(N Q^2 ) no.of subproblems cost per subproblem

My research group is building a 128-processor Execution Migration Machine that uses a migration predictor based on this analysis.

Lecture 24: Research Areas and Beyond 6.

Erik’s Main Research Areas

  • computational geometry [6.850]
    • geometric folding algorithms [6.849]
    • self-assembly
  • data structures [6.851]
  • graph algorithms [6.899]
  • recreational algorithms [SP.268]
  • algorithmic sculpture

Geometric Folding Algorithms: [6.849], Videos Online

Two aspects: design and foldability

  • design: algorithms to fold any polyhedral surface from a square of paper [Demaine, Demaine, Mitchell (2000); Demaine & Tachi (2011)] - bicolor paper =⇒ can 2-color faces - OPEN: how to best optimize “scale-factor” - e.g. best n × n checkerboard folding — recently improved from ≈ n/ 2 →≈ n/ 4
  • foldability: given a crease pattern, can you fold it flat
    • NP-complete in general Bern & Hayes (1996)
    • OPEN: m × n map with creases specified as mountain/valley [Edmonds (1997)]
    • just solved: 2 × n Demaine, Liu, Morgan (2011)
    • hyperbolic paraboloid [Bauhaus (1929)] doesn’t exist [Demaine, Demaine, Hart, Price, Tachi (2009)]

block B

block B

CPU c blocks

FAST SLOW

CACHE DISK/MAIN

MEMORY

( A lm ost ) P lanar G r aphs : [6. 889], V ideos O nline

  • Dijkstra in O(n) time [Henzinger, Klein, Rao, Subramanian (1997)]
  • Bellman-Ford in O

n lg^2 n lg lg n time^ [Mozes^ &^ Wolff-Nilson^ (2010)]

  • Many problems NP-hard, even on planar graphs But can find a solution within 1 + ε

r k

k k

k

factor of optimal, for any E [Baker 1994 & Others]:

  • run BFS from any root vertex r
  • delete every k layers 1 1
  • for many problems, solution messed up by only 1 + (^) k factor ( =⇒ k = (^) ε)
  • connected components of remaining graph have < k layers. Can solve via DP typically in ≈ 2 k^ · n time

Recreational Algorithms

  • many algorithms and complexities of games [some in SP.268 and our book Games, Puzzles & Computation (2009)] n^2
  • n × n × n Rubik’s Cube diameter is Θ [Demaine, Demaine, Eisenstat, Lubiw, lg n Winslow (2011)]
  • Tetris is NP-complete [Breukelaar, Demaine, Hohenberger, Hoogeboom, Kosters, Liben- Nowell (2004)]
  • balloon twisting any polyhedron [Demaine, Demaine, Hart (2008)]
  • algorithmic magic tricks

Top 10 Uses of 6.006 Cushions

  1. Sit on it: guaranteed inspiration in constant time

(bring it to the final exam)

  1. Frisbee (after cutting it into a circle)*
  2. Sell as a limited-edition collectible on eBay

(they’ll probably never be made again—at least $5)

  1. Put two back-to-back to remove branding*

(so no one will ever know you took this class)

  1. Holiday conversation starter… and stopper

(we don’t recommend re-gifting)

  1. Asymptotically optimal acoustic paneling

(for practicing piano & guitar fingering DP)

  1. Target practice for your next LARP*

(Live Action Role Playing)

  1. Ten years from now, it might be all you'll

remember about 6.

(maybe also this top ten list)

  1. Final exam cheat sheet*
  2. Three words: OkCupid profile picture

MIT OpenCourseWare http://ocw.mit.edu

6.00 6 Introduction to Algorithms

Fall 2011

For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.