狠狠撸

狠狠撸Share a Scribd company logo
Midterm Review

     ? Last Time
          ? Web Indexing and Matrix Inversion
          ? How to Make Page Rank go fast…
     ? Today
          ? Midterm Review
     ? Reminders/Announcements
          ? Midterm Thursday, April 28 (In class)
          ? Please come on time; We’ll start on time




CSE 160 Chien, Spring 2005                             Lecture #9, 狠狠撸 1




                             Coverage

     ? Lectures: Overheads, Discussions
     ? Readings: Textbooks, a few other artices
     ? Homeworks: Parallelism, Synchronization, Java,
       Performance
     ? Sections: Deeper Understanding




CSE 160 Chien, Spring 2005                             Lecture #9, 狠狠撸 2
Readings

     ? Concurrent Programming in Java: Design Principles
       and Patterns, Second Edition, 1999
     ? Lea, Chapter 4.4
     ? One or two of the following: Javasoft Thread Tutorial
       OR Arnold/Gosling, The Java Programming
       Language, Chapter 9 OR 1996 Thread Programming
       Articles, Part 1 and Part 2
     ? Lea, Chapter 2, 1.2, 4.2

     ? => Not the optional readings occasionally mentioned
       in class
CSE 160 Chien, Spring 2005                                    Lecture #9, 狠狠撸 3




                  What is Parallelism?

     ? Importance of parallelism
          ? Foundation of Performance
          ? Has been in the past (pipelining, superscalar)
          ? Continue in the future (multithreading, multi-core, multi-node)
     ? Technology
          ?   Hardware Drivers for Increased Parallelism
          ?   Smaller Transistors, slow increase in clock rates
          ?   Speed of light limitations
          ?   Difficulty of more “implicit parallelism”
          ?   Multi-core is coming; all machines are parallel
          ?   10,000 – 100,000 node machines today, Millions in the
              future!

CSE 160 Chien, Spring 2005                                    Lecture #9, 狠狠撸 4
What is Parallelism? (cont.)

     ? Applications
          ? Many large-scale applications have exploding needs for
            computation
          ? Major sources
               – Deeper and more complex analysis: Example: detailed Modeling,
                 Image processing, rendering
               – Massive Data: point of sale, video observation, sensor networks
               – Massive Activity: inventory and sale, web activities (massive human),
                 computer-computer (frequent flyer!)
     ? Scale up/scale forward
          ? Scale up for large-scale performance
          ? Scale forward for continued rapid increases (as expected due to
            Moore’s law)


CSE 160 Chien, Spring 2005                                               Lecture #9, 狠狠撸 5




                    Parallelism in Java

     ? Threads
          ? Basis for Parallelism in Java – each an independently executable
            locus of control
          ? Derivation from Thread Class, Define Runnable Interface
          ? Relating Parallelism to Sequential Classes and Programs
     ? Synchronization
          ? Synchronized Blocks and Methods
          ? Threads and Locks, “Don’t break sequential code”
          ? Making Data Structures “concurrency safe” and tension with flexible
            parallelization (a la Jacobi iteration)
          ? Deadlocks: Set of threads waiting for locks which will never be
            satisfied
          ? Livelock: Set of threads chasing each other, never will stop


CSE 160 Chien, Spring 2005                                               Lecture #9, 狠狠撸 6
Parallelism in Java (cont.)

     ? Thread Coordination and Scheduling
          ?   Wait(), Yield(), Notify(), NotifyAll()
          ?   Why you would want to use them
          ?   How to use them
          ?   Pitfalls in Using them (correctness)
          ?   Costs of Using them
     ? Advantages of Java
          ? Integrated Model of Threading, Parallelism, Synchronization
          ? Nice, clean, portable interfaces to threading, locks,
            parallelism, etc. (this CAN be ugly)
          ? Reasonable type integration; no need for lots of casts, etc.


CSE 160 Chien, Spring 2005                                   Lecture #9, 狠狠撸 7




        Architecture and Hardware

     ? Implicit vs. Explicit parallelism
          ? Pipelining and Superscalar
          ? Multithreading (including SMT), Multiple Processors, and
            Multiple-Nodes
     ? Multiprocessors/threads (Shared Memory)
          ?   Parallelism against a shared memory (like Opterons)
          ?   Locks and Synchronization
          ?   Caches and Locality; relative performance
          ?   Limited Scalability




CSE 160 Chien, Spring 2005                                   Lecture #9, 狠狠撸 8
Architecture and Hardware
                        (cont.)

     ? Multi-Node/Cluster (Distributed Memory)
          ? Local SMP? Sometimes
          ? Message Passing
          ? Massive Scalability
     ? Range of Systems
          ? Small scale, large scale
          ? Multi-core coming in large numbers




CSE 160 Chien, Spring 2005                                  Lecture #9, 狠狠撸 9




                             Applications

     ? Three applications
          ?   Relevant Application Definition
          ?   Data Sets
          ?   Algorithms
          ?   Practical Aspects of Parallelism
     ? Parallel Sorting
          ? Shared Address Space Algorithms
          ? Heroic Sorting: Minute Sort, Terabyte Sort, Penny Sort
               – Initial Exposure to “Benchmarks”
          ? Scalable Algorithms: Bucket Sort and Challenges
          ? Realities of Implementation
               – What is easy, what is hard

CSE 160 Chien, Spring 2005                                 Lecture #9, 狠狠撸 10
Applications (cont.)

     ? Jacobi Iteration: Partial Differential Equation Solver
          ?   Widespread Use in Modeling: fluids, air, crashes, etc.
          ?   Floating Point and Linear Systems
          ?   Simple, Regular Structure
          ?   Parallelism Structure is often regular; Lots of Parallelism!
          ?   Threads can ensure correct execution by convention; not individual
              object locking -> much simpler, more flexible programs
     ? Web Search/Indexing
          ?   Practical Constraints of Web: Huge, Never Static!
          ?   Basic Indexing for Word Counts
          ?   Efficient and Scalable Retrieval of Matching Pages
          ?   PageRank Algorithm
          ?   Composing Responses to Page Ranked Requests


CSE 160 Chien, Spring 2005                                         Lecture #9, 狠狠撸 11




                             Exam Format

     ? Short Questions (~50 %)
          ? Coverage of All Course Topics to Date (Parallelism, Java,
            Machines, Applications)
          ? Write a sentence or two
          ? Demonstrate Understanding and Depth in an Area

     ? Examples (guaranteed to NOT be on the exam!)
          ? “Explain the notion that Java threads hold locks, and give an
            example of how this affects programming.”
          ? “Define Implicit Parallelism and Explicit Parallelism from a
            Programming Perspective”
          ? “What level of parallelism is present in current-day
            microprocessors, and how is it likely to change in the future?”


CSE 160 Chien, Spring 2005                                         Lecture #9, 狠狠撸 12
Exam Format (cont.)

     ? Two Longer Questions (~50 %)
          ? Understand a Java Program
          ? Modify Code
          ? Write Code

     ? Illuminate the concepts and ideas that we have
       covered
     ? Homeworks problems are a fertile area for
       preparation here



CSE 160 Chien, Spring 2005                       Lecture #9, 狠狠撸 13




       TA Midterm Review Section

     ? Sagnik Nandy will hold a Review and answer
       questions about course material
          ?   Readings
          ?   Homeworks
          ?   Lectures
          ?   Sections


     ? Wednesday April 27, 2-4pm, Location 4218 APM




CSE 160 Chien, Spring 2005                       Lecture #9, 狠狠撸 14
Summary

     ? Midterm has comprehensive Coverage of Course
       Material to this point
     ? Elements
          ? Lectures, Homeworks, Readings, Sections
     ? Topics
          ?   Parallelism
          ?   Java, Threads, Synchronization
          ?   Parallel Machines
          ?   Applications



CSE 160 Chien, Spring 2005                            Lecture #9, 狠狠撸 15




                             Questions?
Ad

Recommended

Correct and efficient synchronization of java thread
Correct and efficient synchronization of java thread
outofmemoryerror
?
PAC 2019 virtual Alexander Podelko
PAC 2019 virtual Alexander Podelko
Neotys
?
Why akka
Why akka
Sapardi Sapardi
?
The economies of scaling software - Abdel Remani
The economies of scaling software - Abdel Remani
jaxconf
?
A tour of Java and the JVM
A tour of Java and the JVM
Alex Birch
?
Scala in-practice-3-years by Patric Fornasier, Springr, presented at Pune Sca...
Scala in-practice-3-years by Patric Fornasier, Springr, presented at Pune Sca...
Thoughtworks
?
Pydata Katya Vasilaky
Pydata Katya Vasilaky
knv4
?
Peyton jones-2011-parallel haskell-the_future
Peyton jones-2011-parallel haskell-the_future
Takayuki Muranushi
?
Simon Peyton Jones: Managing parallelism
Simon Peyton Jones: Managing parallelism
Skills Matter
?
Parallel Computing 2007: Overview
Parallel Computing 2007: Overview
Geoffrey Fox
?
Parallel Computing -- II -- Introduction
Parallel Computing -- II -- Introduction
arnabsahuyspm
?
Parallel Processing Concepts
Parallel Processing Concepts
Dr Shashikant Athawale
?
Parallel Programming Primer 1
Parallel Programming Primer 1
mobius.cn
?
Thinking in parallel ab tuladev
Thinking in parallel ab tuladev
Pavel Tsukanov
?
Parallel and distributed computing.zhang zhiguo.2009w 1
Parallel and distributed computing.zhang zhiguo.2009w 1
feliugarcia
?
C++ Data-flow Parallelism sounds great! But how practical is it? Let’s see ho...
C++ Data-flow Parallelism sounds great! But how practical is it? Let’s see ho...
Jason Hearne-McGuiness
?
Parallel Programming Primer
Parallel Programming Primer
Sri Prasanna
?
Our Concurrent Past; Our Distributed Future
Our Concurrent Past; Our Distributed Future
C4Media
?
Chap1 slides
Chap1 slides
BaliThorat1
?
Lecture 04 Chapter 1 - Introduction to Parallel Computing
Lecture 04 Chapter 1 - Introduction to Parallel Computing
National College of Business Administration & Economics ( NCBA&E)
?
CSE_17CS72_U1_S1_Pr.pptxx"xxxxxxxxxxxx"xx
CSE_17CS72_U1_S1_Pr.pptxx"xxxxxxxxxxxx"xx
GooGle942495
?
Challenges in Maintaining a High Performance Search Engine Written in Java
Challenges in Maintaining a High Performance Search Engine Written in Java
lucenerevolution
?
Eventdriven I/O - A hands on introduction
Eventdriven I/O - A hands on introduction
Marc Seeger
?
Parallel architecture
Parallel architecture
Mr SMAK
?
Unit 1 deeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeep.pptx
Unit 1 deeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeep.pptx
chingcho417
?
Parallel Algorithms
Parallel Algorithms
Dr Sandeep Kumar Poonia
?
Advanced computer architecture
Advanced computer architecture
vamsi krishna
?
[Harvard CS264] 02 - Parallel Thinking, Architecture, Theory & Patterns
[Harvard CS264] 02 - Parallel Thinking, Architecture, Theory & Patterns
npinto
?
burstone analysis.pptx..........................................................
burstone analysis.pptx..........................................................
UjjawalKrishnan
?
在线购买西班牙毕业证安东尼奥·德·内夫里哈大学文凭鲍础狈贰学费单
在线购买西班牙毕业证安东尼奥·德·内夫里哈大学文凭鲍础狈贰学费单
Taqyea
?

More Related Content

Similar to Hi (20)

Simon Peyton Jones: Managing parallelism
Simon Peyton Jones: Managing parallelism
Skills Matter
?
Parallel Computing 2007: Overview
Parallel Computing 2007: Overview
Geoffrey Fox
?
Parallel Computing -- II -- Introduction
Parallel Computing -- II -- Introduction
arnabsahuyspm
?
Parallel Processing Concepts
Parallel Processing Concepts
Dr Shashikant Athawale
?
Parallel Programming Primer 1
Parallel Programming Primer 1
mobius.cn
?
Thinking in parallel ab tuladev
Thinking in parallel ab tuladev
Pavel Tsukanov
?
Parallel and distributed computing.zhang zhiguo.2009w 1
Parallel and distributed computing.zhang zhiguo.2009w 1
feliugarcia
?
C++ Data-flow Parallelism sounds great! But how practical is it? Let’s see ho...
C++ Data-flow Parallelism sounds great! But how practical is it? Let’s see ho...
Jason Hearne-McGuiness
?
Parallel Programming Primer
Parallel Programming Primer
Sri Prasanna
?
Our Concurrent Past; Our Distributed Future
Our Concurrent Past; Our Distributed Future
C4Media
?
Chap1 slides
Chap1 slides
BaliThorat1
?
Lecture 04 Chapter 1 - Introduction to Parallel Computing
Lecture 04 Chapter 1 - Introduction to Parallel Computing
National College of Business Administration & Economics ( NCBA&E)
?
CSE_17CS72_U1_S1_Pr.pptxx"xxxxxxxxxxxx"xx
CSE_17CS72_U1_S1_Pr.pptxx"xxxxxxxxxxxx"xx
GooGle942495
?
Challenges in Maintaining a High Performance Search Engine Written in Java
Challenges in Maintaining a High Performance Search Engine Written in Java
lucenerevolution
?
Eventdriven I/O - A hands on introduction
Eventdriven I/O - A hands on introduction
Marc Seeger
?
Parallel architecture
Parallel architecture
Mr SMAK
?
Unit 1 deeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeep.pptx
Unit 1 deeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeep.pptx
chingcho417
?
Parallel Algorithms
Parallel Algorithms
Dr Sandeep Kumar Poonia
?
Advanced computer architecture
Advanced computer architecture
vamsi krishna
?
[Harvard CS264] 02 - Parallel Thinking, Architecture, Theory & Patterns
[Harvard CS264] 02 - Parallel Thinking, Architecture, Theory & Patterns
npinto
?
Simon Peyton Jones: Managing parallelism
Simon Peyton Jones: Managing parallelism
Skills Matter
?
Parallel Computing 2007: Overview
Parallel Computing 2007: Overview
Geoffrey Fox
?
Parallel Computing -- II -- Introduction
Parallel Computing -- II -- Introduction
arnabsahuyspm
?
Parallel Programming Primer 1
Parallel Programming Primer 1
mobius.cn
?
Thinking in parallel ab tuladev
Thinking in parallel ab tuladev
Pavel Tsukanov
?
Parallel and distributed computing.zhang zhiguo.2009w 1
Parallel and distributed computing.zhang zhiguo.2009w 1
feliugarcia
?
C++ Data-flow Parallelism sounds great! But how practical is it? Let’s see ho...
C++ Data-flow Parallelism sounds great! But how practical is it? Let’s see ho...
Jason Hearne-McGuiness
?
Parallel Programming Primer
Parallel Programming Primer
Sri Prasanna
?
Our Concurrent Past; Our Distributed Future
Our Concurrent Past; Our Distributed Future
C4Media
?
CSE_17CS72_U1_S1_Pr.pptxx"xxxxxxxxxxxx"xx
CSE_17CS72_U1_S1_Pr.pptxx"xxxxxxxxxxxx"xx
GooGle942495
?
Challenges in Maintaining a High Performance Search Engine Written in Java
Challenges in Maintaining a High Performance Search Engine Written in Java
lucenerevolution
?
Eventdriven I/O - A hands on introduction
Eventdriven I/O - A hands on introduction
Marc Seeger
?
Parallel architecture
Parallel architecture
Mr SMAK
?
Unit 1 deeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeep.pptx
Unit 1 deeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeep.pptx
chingcho417
?
Advanced computer architecture
Advanced computer architecture
vamsi krishna
?
[Harvard CS264] 02 - Parallel Thinking, Architecture, Theory & Patterns
[Harvard CS264] 02 - Parallel Thinking, Architecture, Theory & Patterns
npinto
?

Recently uploaded (20)

burstone analysis.pptx..........................................................
burstone analysis.pptx..........................................................
UjjawalKrishnan
?
在线购买西班牙毕业证安东尼奥·德·内夫里哈大学文凭鲍础狈贰学费单
在线购买西班牙毕业证安东尼奥·德·内夫里哈大学文凭鲍础狈贰学费单
Taqyea
?
最新版美国堪萨斯大学毕业证(碍鲍毕业证书)原版定制
最新版美国堪萨斯大学毕业证(碍鲍毕业证书)原版定制
taqyea
?
silver_linings_playbook the movie the movie
silver_linings_playbook the movie the movie
VernonSmap
?
EDM Training - Fire Prevention & Protection.pptx
EDM Training - Fire Prevention & Protection.pptx
mujtaba1mk
?
Sydney Sweeney_ A Deep Dive into the Actress’s Journey and Impact.docx
Sydney Sweeney_ A Deep Dive into the Actress’s Journey and Impact.docx
voice ofarticle
?
最新版美国堪萨斯州立大学毕业证(碍-厂迟补迟别毕业证书)原版定制
最新版美国堪萨斯州立大学毕业证(碍-厂迟补迟别毕业证书)原版定制
taqyea
?
SpeakOut_TeachersBook_Advanced_PlusEdition.pdf
SpeakOut_TeachersBook_Advanced_PlusEdition.pdf
agustolosa93
?
tiranga ritik baclink indexing on google
tiranga ritik baclink indexing on google
Jalwa Game
?
仿制颁厂鲍厂学费单美国加利福尼亚州立大学萨克拉门托分校毕业证范本,颁厂鲍厂文凭
仿制颁厂鲍厂学费单美国加利福尼亚州立大学萨克拉门托分校毕业证范本,颁厂鲍厂文凭
taqyed
?
原版一样(滨奥鲍毕业证书)美国印第安纳卫斯里大学毕业证在线购买
原版一样(滨奥鲍毕业证书)美国印第安纳卫斯里大学毕业证在线购买
taqyed
?
PRESENTATION ON DYANAM YOGA BRAIN HEART SOUL
PRESENTATION ON DYANAM YOGA BRAIN HEART SOUL
VenkatDeepakSarma
?
Breaking the Romance Narrative – Why I Wrote “Hello”
Breaking the Romance Narrative – Why I Wrote “Hello”
itstriggerhere
?
The Bet - Concept Teaser v06 Storyboards
The Bet - Concept Teaser v06 Storyboards
Jim Mortensen
?
Jordan Minnesota - The Town Where Your Diet Comes to Die
Jordan Minnesota - The Town Where Your Diet Comes to Die
Forklift Trucks in Minnesota
?
Strategy & Survival in Aliens Another Glorious Day in the Corps!
Strategy & Survival in Aliens Another Glorious Day in the Corps!
BoardGamesNMore
?
奥丑补迟蝉础辫辫网页.诲辞肠虫奥丑补奥丑补迟蝉础辫辫网页迟蝉础辫辫网页奥丑补迟蝉础辫辫网页
奥丑补迟蝉础辫辫网页.诲辞肠虫奥丑补奥丑补迟蝉础辫辫网页迟蝉础辫辫网页奥丑补迟蝉础辫辫网页
aliraza904620
?
Top 1 app watch girls livestream (1).docx
Top 1 app watch girls livestream (1).docx
jonhsey0009
?
Ralf Schumacher_ The Shadow and the Spotlight in Formula One.docx
Ralf Schumacher_ The Shadow and the Spotlight in Formula One.docx
voice ofarticle
?
Metamorphosis_Kafka_Cover mast hn kr lo downdold04.25.pdf
Metamorphosis_Kafka_Cover mast hn kr lo downdold04.25.pdf
jitendergiri2000
?
burstone analysis.pptx..........................................................
burstone analysis.pptx..........................................................
UjjawalKrishnan
?
在线购买西班牙毕业证安东尼奥·德·内夫里哈大学文凭鲍础狈贰学费单
在线购买西班牙毕业证安东尼奥·德·内夫里哈大学文凭鲍础狈贰学费单
Taqyea
?
最新版美国堪萨斯大学毕业证(碍鲍毕业证书)原版定制
最新版美国堪萨斯大学毕业证(碍鲍毕业证书)原版定制
taqyea
?
silver_linings_playbook the movie the movie
silver_linings_playbook the movie the movie
VernonSmap
?
EDM Training - Fire Prevention & Protection.pptx
EDM Training - Fire Prevention & Protection.pptx
mujtaba1mk
?
Sydney Sweeney_ A Deep Dive into the Actress’s Journey and Impact.docx
Sydney Sweeney_ A Deep Dive into the Actress’s Journey and Impact.docx
voice ofarticle
?
最新版美国堪萨斯州立大学毕业证(碍-厂迟补迟别毕业证书)原版定制
最新版美国堪萨斯州立大学毕业证(碍-厂迟补迟别毕业证书)原版定制
taqyea
?
SpeakOut_TeachersBook_Advanced_PlusEdition.pdf
SpeakOut_TeachersBook_Advanced_PlusEdition.pdf
agustolosa93
?
tiranga ritik baclink indexing on google
tiranga ritik baclink indexing on google
Jalwa Game
?
仿制颁厂鲍厂学费单美国加利福尼亚州立大学萨克拉门托分校毕业证范本,颁厂鲍厂文凭
仿制颁厂鲍厂学费单美国加利福尼亚州立大学萨克拉门托分校毕业证范本,颁厂鲍厂文凭
taqyed
?
原版一样(滨奥鲍毕业证书)美国印第安纳卫斯里大学毕业证在线购买
原版一样(滨奥鲍毕业证书)美国印第安纳卫斯里大学毕业证在线购买
taqyed
?
PRESENTATION ON DYANAM YOGA BRAIN HEART SOUL
PRESENTATION ON DYANAM YOGA BRAIN HEART SOUL
VenkatDeepakSarma
?
Breaking the Romance Narrative – Why I Wrote “Hello”
Breaking the Romance Narrative – Why I Wrote “Hello”
itstriggerhere
?
The Bet - Concept Teaser v06 Storyboards
The Bet - Concept Teaser v06 Storyboards
Jim Mortensen
?
Jordan Minnesota - The Town Where Your Diet Comes to Die
Jordan Minnesota - The Town Where Your Diet Comes to Die
Forklift Trucks in Minnesota
?
Strategy & Survival in Aliens Another Glorious Day in the Corps!
Strategy & Survival in Aliens Another Glorious Day in the Corps!
BoardGamesNMore
?
奥丑补迟蝉础辫辫网页.诲辞肠虫奥丑补奥丑补迟蝉础辫辫网页迟蝉础辫辫网页奥丑补迟蝉础辫辫网页
奥丑补迟蝉础辫辫网页.诲辞肠虫奥丑补奥丑补迟蝉础辫辫网页迟蝉础辫辫网页奥丑补迟蝉础辫辫网页
aliraza904620
?
Top 1 app watch girls livestream (1).docx
Top 1 app watch girls livestream (1).docx
jonhsey0009
?
Ralf Schumacher_ The Shadow and the Spotlight in Formula One.docx
Ralf Schumacher_ The Shadow and the Spotlight in Formula One.docx
voice ofarticle
?
Metamorphosis_Kafka_Cover mast hn kr lo downdold04.25.pdf
Metamorphosis_Kafka_Cover mast hn kr lo downdold04.25.pdf
jitendergiri2000
?
Ad

Hi

  • 1. Midterm Review ? Last Time ? Web Indexing and Matrix Inversion ? How to Make Page Rank go fast… ? Today ? Midterm Review ? Reminders/Announcements ? Midterm Thursday, April 28 (In class) ? Please come on time; We’ll start on time CSE 160 Chien, Spring 2005 Lecture #9, 狠狠撸 1 Coverage ? Lectures: Overheads, Discussions ? Readings: Textbooks, a few other artices ? Homeworks: Parallelism, Synchronization, Java, Performance ? Sections: Deeper Understanding CSE 160 Chien, Spring 2005 Lecture #9, 狠狠撸 2
  • 2. Readings ? Concurrent Programming in Java: Design Principles and Patterns, Second Edition, 1999 ? Lea, Chapter 4.4 ? One or two of the following: Javasoft Thread Tutorial OR Arnold/Gosling, The Java Programming Language, Chapter 9 OR 1996 Thread Programming Articles, Part 1 and Part 2 ? Lea, Chapter 2, 1.2, 4.2 ? => Not the optional readings occasionally mentioned in class CSE 160 Chien, Spring 2005 Lecture #9, 狠狠撸 3 What is Parallelism? ? Importance of parallelism ? Foundation of Performance ? Has been in the past (pipelining, superscalar) ? Continue in the future (multithreading, multi-core, multi-node) ? Technology ? Hardware Drivers for Increased Parallelism ? Smaller Transistors, slow increase in clock rates ? Speed of light limitations ? Difficulty of more “implicit parallelism” ? Multi-core is coming; all machines are parallel ? 10,000 – 100,000 node machines today, Millions in the future! CSE 160 Chien, Spring 2005 Lecture #9, 狠狠撸 4
  • 3. What is Parallelism? (cont.) ? Applications ? Many large-scale applications have exploding needs for computation ? Major sources – Deeper and more complex analysis: Example: detailed Modeling, Image processing, rendering – Massive Data: point of sale, video observation, sensor networks – Massive Activity: inventory and sale, web activities (massive human), computer-computer (frequent flyer!) ? Scale up/scale forward ? Scale up for large-scale performance ? Scale forward for continued rapid increases (as expected due to Moore’s law) CSE 160 Chien, Spring 2005 Lecture #9, 狠狠撸 5 Parallelism in Java ? Threads ? Basis for Parallelism in Java – each an independently executable locus of control ? Derivation from Thread Class, Define Runnable Interface ? Relating Parallelism to Sequential Classes and Programs ? Synchronization ? Synchronized Blocks and Methods ? Threads and Locks, “Don’t break sequential code” ? Making Data Structures “concurrency safe” and tension with flexible parallelization (a la Jacobi iteration) ? Deadlocks: Set of threads waiting for locks which will never be satisfied ? Livelock: Set of threads chasing each other, never will stop CSE 160 Chien, Spring 2005 Lecture #9, 狠狠撸 6
  • 4. Parallelism in Java (cont.) ? Thread Coordination and Scheduling ? Wait(), Yield(), Notify(), NotifyAll() ? Why you would want to use them ? How to use them ? Pitfalls in Using them (correctness) ? Costs of Using them ? Advantages of Java ? Integrated Model of Threading, Parallelism, Synchronization ? Nice, clean, portable interfaces to threading, locks, parallelism, etc. (this CAN be ugly) ? Reasonable type integration; no need for lots of casts, etc. CSE 160 Chien, Spring 2005 Lecture #9, 狠狠撸 7 Architecture and Hardware ? Implicit vs. Explicit parallelism ? Pipelining and Superscalar ? Multithreading (including SMT), Multiple Processors, and Multiple-Nodes ? Multiprocessors/threads (Shared Memory) ? Parallelism against a shared memory (like Opterons) ? Locks and Synchronization ? Caches and Locality; relative performance ? Limited Scalability CSE 160 Chien, Spring 2005 Lecture #9, 狠狠撸 8
  • 5. Architecture and Hardware (cont.) ? Multi-Node/Cluster (Distributed Memory) ? Local SMP? Sometimes ? Message Passing ? Massive Scalability ? Range of Systems ? Small scale, large scale ? Multi-core coming in large numbers CSE 160 Chien, Spring 2005 Lecture #9, 狠狠撸 9 Applications ? Three applications ? Relevant Application Definition ? Data Sets ? Algorithms ? Practical Aspects of Parallelism ? Parallel Sorting ? Shared Address Space Algorithms ? Heroic Sorting: Minute Sort, Terabyte Sort, Penny Sort – Initial Exposure to “Benchmarks” ? Scalable Algorithms: Bucket Sort and Challenges ? Realities of Implementation – What is easy, what is hard CSE 160 Chien, Spring 2005 Lecture #9, 狠狠撸 10
  • 6. Applications (cont.) ? Jacobi Iteration: Partial Differential Equation Solver ? Widespread Use in Modeling: fluids, air, crashes, etc. ? Floating Point and Linear Systems ? Simple, Regular Structure ? Parallelism Structure is often regular; Lots of Parallelism! ? Threads can ensure correct execution by convention; not individual object locking -> much simpler, more flexible programs ? Web Search/Indexing ? Practical Constraints of Web: Huge, Never Static! ? Basic Indexing for Word Counts ? Efficient and Scalable Retrieval of Matching Pages ? PageRank Algorithm ? Composing Responses to Page Ranked Requests CSE 160 Chien, Spring 2005 Lecture #9, 狠狠撸 11 Exam Format ? Short Questions (~50 %) ? Coverage of All Course Topics to Date (Parallelism, Java, Machines, Applications) ? Write a sentence or two ? Demonstrate Understanding and Depth in an Area ? Examples (guaranteed to NOT be on the exam!) ? “Explain the notion that Java threads hold locks, and give an example of how this affects programming.” ? “Define Implicit Parallelism and Explicit Parallelism from a Programming Perspective” ? “What level of parallelism is present in current-day microprocessors, and how is it likely to change in the future?” CSE 160 Chien, Spring 2005 Lecture #9, 狠狠撸 12
  • 7. Exam Format (cont.) ? Two Longer Questions (~50 %) ? Understand a Java Program ? Modify Code ? Write Code ? Illuminate the concepts and ideas that we have covered ? Homeworks problems are a fertile area for preparation here CSE 160 Chien, Spring 2005 Lecture #9, 狠狠撸 13 TA Midterm Review Section ? Sagnik Nandy will hold a Review and answer questions about course material ? Readings ? Homeworks ? Lectures ? Sections ? Wednesday April 27, 2-4pm, Location 4218 APM CSE 160 Chien, Spring 2005 Lecture #9, 狠狠撸 14
  • 8. Summary ? Midterm has comprehensive Coverage of Course Material to this point ? Elements ? Lectures, Homeworks, Readings, Sections ? Topics ? Parallelism ? Java, Threads, Synchronization ? Parallel Machines ? Applications CSE 160 Chien, Spring 2005 Lecture #9, 狠狠撸 15 Questions?