cmslides-bw - Concurrency & Multithreading...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

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

Unformatted text preview: Concurrency & Multithreading Maurice Herlihy & Nir Shavit The Art of Multiprocessor Programming Morgan Kaufmann, 2008 Set-Up of the Course 12 lectures: Wan Fokkink room T443 email: wanf@few.vu.nl 10 exercise classes: Ben van Werkhoven 2 computer labs: Pieter Hijma 2 programming assignments: 20% of final mark written exam: 80% of final mark you may use (clean) copies of slides homepage: http://www.cs.vu.nl/ ∼ tcs/cm/ structure of the course schedule of lectures, exercise classes, computer labs copies of the slides Moore’s Law The number of transistors on a chip still doubles every two years. But clock rate is flattening sharply, due to overheating problems. A multiprocessor combines multiple CPUs in one computer system. Shared Memory Multiprocessor (Multicore) caches bus shared memory processors Symmetric multiprocessing architecture OpenMP is an API for programming in C, C++ and Fortran on such architectures. Non-Uniform Memory Access Architecture MPI is a specification of an API for programming on such architectures. The Multicore Frenzy Microsoft (Task Parallel Library) and Apple (Grand Central Dispatch) are developing technology to optimize applications for symmetric multiprocessing architectures. Microsoft (Interactive Supercomputing) and Intel (Rapid Minds, Cilk Arts) are buying up companies that develop technology to build programs for multicore chips. Multiprocessor Programming is Challenging At a small scale: e.g., processors within one chip must coordinate access to shared memory. At a large scale: e.g., processors in a supercomputer must coordinate routing of data. Concurrent components are asynchronous: Activities can be halted or delayed without warning; these delays are unpredictable, and vary greatly. Sequential Computation memory object object thread Concurrent Computation memory object object threads Asynchrony Sudden unpredictable delays: I cache miss (short) I page fault (long) I scheduling quantum used up (really long) Model Summary I multiple threads I single shared memory I objects live in memory I unpredictable asynchronous delays Jargon: I hardware: processors I software: threads Road Map We will first focus on principles of multiprocessor programming, then on “practice”. I start with idealized models I look at simplistic , fundamental problems I emphasize correctness over pragmatism Correctness may be theoretical, but incorrectness has practical impact. Example: Parallel Primality Testing Challenge: print all primes up to 10 10 Given: 10-processor multiprocessor, 1 thread per processor Goal: get (close to) ten-fold speed-up Na¨ ıve approach: thread i takes care of interval h ( i- 1) · 10 9 , i · 10 9 ] On the one hand, higher ranges contain fewer primes....
View Full Document

This note was uploaded on 10/11/2010 for the course COS COS226 taught by Professor Klazar during the Spring '10 term at University of Pretoria.

Page1 / 476

cmslides-bw - Concurrency & Multithreading...

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

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