Successfully reported this slideshow.
Activate your 14 day free trial to unlock unlimited reading.
The Free Lunch Is Over. A
Fundamental Turn Toward
Concurrency in Software
To scale performance, put many processing cores on the
New Moore’s law edition is about doubling of cores.
No matter how fast processors get, software
consistently finds new ways to eat up the extra speed
If you haven‟t done so already, now is the time to take
a hard look at the design of your application,
determine what operations are CPU-sensitive now or
are likely to become so soon, and identify how those
places could benefit from concurrency.”
-- Herb Sutter, C++ Architect at Microsoft (March
After decades of single core processors, the high
volume processor industry has gone from single to
dual to quad-core in just the last two years. Moore‟s
Law scaling should easily let us hit the 80-core mark
in mainstream processors within the next ten years
and quite possibly even less.
-- Justin Rattner, CTO, Intel (February
What keeps us away from multicore
Sequential way of thinking
Believe that parallel programming is difficult and
Unwilling to accept the fact that sequential era is
What have been done
Many frameworks have been created, that brings
parallelism at application level.
Vendors hardly tries to teach programming
community how to write parallel programs
MIT and other education centers did a lot of
researches in this area
Part 2: Multithreaded algorithms
No single architecture of parallel
computer no single and wide
accepted model of parallel
We rely on parallel shared memory
Dynamic multithreaded model(DMM)
Allows programmer to operate with “logical
parallelism” without worrying about any issues of
Two main features are:
Nested parallelism (parent can proceed while
spawned child is computing its result)
Parallel loop (iteration of the loop can execute
DMM - advantages
Simple extension of “serial model”. Only 3 new
keywords: parallel, spawn and sync.
Provides theoretically clean way of quantify
parallelism based on notions of “work” and
Many MT algorithms based on nested parallelism
a naturally follows from divide and conquer
Analyzing MT algorithms: Matrix
1. n = a.rows
2. let C be new NxN matrix
3. parallel for i = 1 to n
4. parallel for j = 1 to n
5. Cij = 0
6. for k 1 to n
7. Cij= Cij + Aik * B kj
Task Scheduler & Thread pool
Zero information about each work item
Fairness FIFO queue maintain
More efficient FIFO queue (ConcurrentQueue)
Enhance the API to get more information from user
Wait completion, handling exceptions, getting computation
The Free Lunch Is Over: A Fundamental Turn
Toward Concurrency in Software
MIT Introduction to algorithms video lectures
Chapter 27 Multithreaded Algorithms from
Introduction to algorithms 3rd edition
CLR 4.0 ThreadPool Improvements: Part 1
Multicore Programming Primer
ThreadPool on Channel 9
Be the first to like this
Number of Embeds
You have now unlocked unlimited access to 20M+ documents!
Learn faster and smarter from top experts
Download to take your learnings offline and on the go
You also get free access to Scribd!
Instant access to millions of ebooks, audiobooks, magazines, podcasts and more.
Read and listen offline with any device.
Free access to premium services like Tuneln, Mubi and more.