cs8803sc_lecture3

cs8803sc_lecture3 - CS8803SC Software and Hardware...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
1 CS8803SC Software and Hardware Cooperative Computing Patterns for Parallel Programming Prof. Hyesoon Kim School of Computer Science Georgia Institute of Technology Today’s Goal • Last week, we tried to think parallel. • Today, we will study typical patterns of parallel programming • We will also cover background and jargon parallel computing
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
2 How to Create a Parallel Application: Patterns for paral el programming Timothy et al. Original Problem Decompose Into tasks Program Thread n { …. for (;;;) { …. } } Program Thread 1 { …. for (;;;) { …. } } Program Thread 1 { …. for (;;;) { …. } } Code with a parallel program Env. G r o u p in to e x c tio n its . Tasks, shared and local data Units of execution + new shared data for extracted dependencies Corresponding source code Learning to “Think Parallel”: Design Patterns • High quality solution to frequently recurring problem in some domain • Learning design patterns makes the programmer to quickly understand the solution and its context. Patterns for paral el programming Timothy et al.
Background image of page 2
3 Before Writing Parallel Programs • Parallel programs often start as sequential programs – Easy to write and debug – Already developed/tested • Identify program hot spots • Parallelization – Start with hot spots first – Make sequences of small changes, each followed by testing – Patterns provide guidance Dr. Rodric Rabbah, IBM Amdahl's Law • Speedup = Performance for entire task using the enhancement when possible • Speedup = 1 / (P/N+S) • P = parallel fraction (1-S) • N = number of processors • S = serial fraction Performance for entire task without using the enhancement
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
4 Amdahl's Law 0 2 4 6 8 10 12 14 16 18 1 0.95 0.9 0.85 0.8 0.75 0.7 0.65 0.6 0.55 0.5 0.45 0.4 0.35 0.3 0.25 0.2 0.15 0.1 0.05 Serial fraction speedup 2 4 8 16 100 Steps to Parallel Programming Step 1: Find concurrency Step 2: Structure the algorithm so that concurrency can be exploited Step 3 : Implement the algorithm in a suitable programming environment Step 4: Execute and tune the performance of the code on a parallel system Patterns for paral el programming Timothy et al.
Background image of page 4
5 Step 1: Finding Concurrency Decomposition Task Decomposition Data Decomposition
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 15

cs8803sc_lecture3 - CS8803SC Software and Hardware...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online