28-concurrency

28-concurrency - Lecture 28: Concurrency Kenneth M....

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

View Full Document Right Arrow Icon
Lecture 28: Concurrency Kenneth M. Anderson University of Colorado, Boulder CSCI 4448/5448 — Lecture 28 — 12/03/2009 © University of Colorado, 2009 1
Background image of page 1

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

View Full DocumentRight Arrow Icon
Goals for this Lecture • Briefy review concepts behind concurrency in soFtware systems • See examples oF how to make use oF concurrency in OO systems • Look at some oF the problems that occur • Look at one non-OO approach to concurrency that avoids some oF the problems 2
Background image of page 2
Why worry? • Concurrency is hard and I’ve only ever needed single-threaded programs • Why should I care about it? • Answer: multi-core computers • Growth rates for chip speed are Fattening • You can no longer say “lets wait a year and our system will run faster!” • Instead, chips are becoming “wider” • more cores, wider bus (more data at a time), more memory on chip • As chip are not getting faster (the same way they used to), a single-threaded, single process application is not going to see any signi±cant performance gains from new hardware 3
Background image of page 3

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

View Full DocumentRight Arrow Icon
New Model • Instead, the way in which software will see performance gains with new hardware is if they are designed to get faster the more processors they have available • This is not easy: the computations that an application performs has to be amenable to parallelization (that is, being split up into multiple parts that can be computed separately) • If so, such an application will see noticeable speed improvements as it is put on machines with more and more processors. • Laptops currently have 2-cores, will soon have 4-cores, and for high-end machines Intel has an 80-core beast waiting in the wings • A system written for n-cores could potentially see an 80x speed-up when run on such a machine 4
Background image of page 4
5 Basics: Single Thread, Single Process, Single Machine Machine Process Thread Data/Code
Background image of page 5

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

View Full DocumentRight Arrow Icon
Machine 6 Basics: Multiple Thread, Single Process, Single Machine Process Thread Data/Code Thread
Background image of page 6
Machine 7 Basics: Single Thread, Multiple Process, Single Machine Process Thread Data/Code Process Thread Data/Code Process Thread Data/Code
Background image of page 7

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

View Full DocumentRight Arrow Icon
8 Basics: Multi-thread, Multi-Process, Single Machine Machine Process Thread Data/Code Thread Process Thread Data/Code Thread Process Thread Data/Code Thread Note: You can have way more than just two threads per process.
Background image of page 8
9 Basics: Multi-everything Machine Process Thread Data/Code Thread Process Thread Data/Code Thread Process Thread Data/Code Thread Machine Process Thread Data/Code Thread Process Thread Data/Code Thread Process Thread Data/Code Thread
Background image of page 9

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

View Full DocumentRight Arrow Icon
Applications are Dead! Long Live Applications! 10 Due to the ability to have multiple threads, multiple processes, and multiple machines work together on a single problem, the notion of an application is changing. It used to be that: Process Thread Data/Code Application ==
Background image of page 10
Now… we might refer to this as “an application” Machine Process Thread Data/Code Thread Process Thread Data/Code Thread Process Thread Data/Code Thread Machine Process Thread Data/Code Thread Process Thread Data/Code Thread Process Thread Data/Code Thread Machine Process Thread Data/Code Thread For instance, “Google”
Background image of page 11

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

View Full DocumentRight Arrow Icon
Image of page 12
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 03/11/2010 for the course CSCI 5448 taught by Professor Anderson during the Fall '09 term at Colorado.

Page1 / 59

28-concurrency - Lecture 28: Concurrency Kenneth M....

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

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