Docsity

Multicore Programming Primer and Programming Competition, Lecture Slides - Assembly Programming, Slides of Assembly Language Programming

Partial preview of the text

Download Multicore Programming Primer and Programming Competition, Lecture Slides - Assembly Programming and more Slides Assembly Language Programming in PDF only on Docsity!

Prof. Saman Amarasinghe, MIT.^

6.189 IAP 2007Lecture 1Multicore Programming Primerand Programming CompetitionIntroduction^1 6.189 IAP 2007 MIT

2 6.189 IAP 2007 MIT

The “Software Crisis”^ “To put it quite bluntly: as long as there were nomachines, programming was no problem at all;when we had a few weak computers,programming became a mild problem, and nowwe have gigantic computers, programming hasbecome an equally gigantic problem."^ -- E. Dijkstra, 1972 Turing Award Lecture Prof. Saman Amarasinghe, MIT.

4 6.189 IAP 2007 MIT

How Did We Solve theFirst Software Crisis? ●^ High-level languages for von-Neumann machines^ „^ FORTRAN and C ●^ Provided “common machine language” foruniprocessors^ Common Properties Single flow of controlSingle memory image^ Differences: Register File^ ISA Functional UnitsProf. Saman Amarasinghe, MIT.

5 6.189 IAP 2007 MIT

The Second Software Crisis ●^ Time Frame: ’80s and ’90s ●^ Problem: Inability to build and maintain complex androbust applications requiring multi-million lines of codedeveloped by hundreds of programmers^ „^ Computers could handle larger more complex programs ●^ Needed to get Composability, Malleability andMaintainability^ „^ High-performance was not an issueProf. Saman Amarasinghe, MIT.

Æ^ left for Moore’s Law

7 6.189 IAP 2007 MIT

●^ Solid boundary between Hardware and Software ●^ Programmers don’t have to know anything about theprocessor^ „^ High level languages abstract away the processors–^ Ex: Java bytecode is machine independent^ „^ Moore’s law does not require the programmers to knowanything about the processors to get good speedups ●^ Programs are oblivious of the processorProf. Saman Amarasinghe, MIT.

Æ^ work on all

Today:Programmers are Oblivious to Processors processors^ „^ A program written in ’70 using C still works and is much fastertoday ●^ This abstraction provides a lot of freedom for theprogrammers

8 6.189 IAP 2007 MIT

The Origins of a Third Crisis ●^ Time Frame: 2005 to 20?? ●^ Problem: Sequential performance is left behind by Moore’s law ●^ Needed continuous and reasonable performance improvements^ „^ to support new features^ „^ to support larger datasets ●^ While sustaining portability, malleability and maintainabilitywithout unduly increasing complexity faced by the programmer Æ^ critical to keep-up with the current rate of evolution in softwareProf. Saman Amarasinghe, MIT.

10 6.189 IAP 2007 MIT

The March to Multicore:Uniprocessor Performance (SPECint) Prof. Saman Amarasinghe, MIT.

Specint
10000.00 1000.00 100.00 10.00^ 1.0085 86^ 87 88 89 90 91 92 93 94
95 96^ 97 98 99 00^ 01 02 03 04
05 06^07

i nt el 386i nt el 486i nt el pent i umi nt el pent i um 2i nt el pent i um 3i nt el pent i um 4i nt el i t ani umA l pha 21064A l pha 21164A l pha 21264Spar cSuper Spar cSpar c64M i psHP P AP ower P CA M D K 6A M D K 7A M D x86-

11 6.189 IAP 2007 MIT

The March to Multicore:Uniprocessor Performance (SPECint) ●^ General-purpose unicores have stopped historicperformance scaling^ „^ Power consumption^ „^ Wire delays^ „^ DRAM access latency^ „^ Diminishing returns of more instruction-level parallelismProf. Saman Amarasinghe, MIT.

From David Patterson

13 6.189 IAP 2007 MIT

Power Efficiency (watts/spec) 0.7 0.6 0.5 0.4 0.3 0.2 0.1^01982 1984 1987 1990 Prof. Saman Amarasinghe, MIT.

1993 1995 1998 2001 2004

(^2006) Year intel 386intel 486intel pentiumintel pentium 2intel pentium 3intel pentium 4intel itaniumA lpha 21^064 A lpha 21^164 A lpha 21^264 SparcSuperSparc Watts/Spec Sparc64M ipsHP P AP o wer P CA M D K6A M D K7A M D x86-

14 6.189 IAP 2007 MIT

Range of a Wire in One Clock Cycle 0.280.260.240.220.20.180.160.140.120.10.080.060.040.02^01996 1998 2000 2002 Prof. Saman Amarasinghe, MIT.

2004 2006 2008 2010

(^2012 2014) Year 700 MHz 1.25 GHz Process (microns) 2.1 GHz 6 GHz10 GHz

(^2) • 400 mm Die• From the SIA Roadmap 13.5 GHz

16 6.189 IAP 2007 MIT

Diminishing Returns ●^ The ’80s: Superscalar expansion^ „^ 50% per year improvement in performance^ „^ Transistors applied to Prof. Saman Amarasinghe, MIT.

implicit^ parallelism– pipeline processor (10 CPI --> 1 CPI)

●^ The ’90s: The Era of Diminishing Returns^ „^ Squeaking out the last implicit parallelism–^ 2-way to 6-way issue, out-of-order issue, branch prediction–^ 1 CPI --> 0.5 CPI^ „^ performance below expectations^ „^ projects delayed & canceled ●^ The ’00s: The Beginning of the Multicore Era^ „^ The need for Explicit Parallelism

17 6.189 IAP 2007 MIT Prof. Saman Amarasinghe, MIT.

Intel Montecito^ Intel Tanglewood 1.7 Billion transistors^ Dual Core IA/64Dual Core IA/64 Intel Pentium Extreme 3.2GHz Dual Core AMD Opteron Dual Core Intel Tejas & JayhawkUnicore (4GHz P4)

Intel Pentium D^ Intel Dempsey^ (Smithfield)^ Dual Core Xeon CancelledIntel Yonah^ Dual Core Mobile

IBM Power 6^ Dual Core IBM Cell Scalable Multicore IBM Power 4 and 5 Dual Cores Since 2001 Sun Olympus and Niagara^ 8 Processor Cores MIT Raw16 CoresSince 2002 … 1H 2005^

1H 2006^ 2H 20062H 2005

Unicores are on the verge of extinctionMulticores are here 2H 2004

19 6.189 IAP 2007 MIT

Requirements and Outcomes ●^ Requirements^ „^ A good programmer with experience^ „^ Fluent in C ●^ Outcomes^ „^ Know fundamental concepts of parallel programming(both hardware and software)^ „^ Understand issues of parallel performance^ „^ Able to synthesize a fairly complex parallel program^ „^ Hands-on experience with the IBM Cell processorProf. Saman Amarasinghe, MIT.

20 6.189 IAP 2007 MIT

The Project ●^ You proposed the projects ●^ We selected 7 teams^ „^ Mainly by the strength of the project proposals ●^ Seven Great Projects^ „^ Distributed Real-time Ray Tracer^ „^ Global Illumination^ „^ Linear Algebra Pack^ „^ Molecular Dynamics Simulator^ „^ Speech Synthesizer^ „^ Soft Radio^ „^ Backgammon Tutor ●^ Project Characteristics^ „^ Ambitious but accomplishable^ „^ Important and Relevant^ „^ Opportunity to sizzle ●^ Get them started ASAP!Prof. Saman Amarasinghe, MIT.