Lecture 16 - 23.3.18 -------------------- Parallel programming with content addressable memory, as provided by the Linda abstraction. Operations and examples, and a few words on implementation challenges. Overheads 203-213. Reading: Good places to start are the following papers which are both accessible through the library's electronic journals collection. The second has quite a lot on implementation matters (not examinable). Carriero & Gelernter, Linda in Context, Communications of the ACM, 32(4), pages 444-458, 1989. Carriero, Gelernter, Mattson, Sherman, The Linda alternative to message-passing systems, Parallel Computing 20, pages 633-655, 1993. Lecture 15 20.3.18 ------------------ [NB the recording equipment failed for this lecture] TBB parallel_reduce and building your own Range. Building TBB task graphs directly. The work depth-first, steal breadth-first scheduling strategy. Overheads 188-202. Reading: TBB tutorial sections 3.2 - 3.3 and 11.1 - 11.4. The Fibonacci Range example is from a paper by Gonzalez and Fraguela, which can be found on the course webpage (interesting but not required reading). Lecture 14 - 16.3.18 -------------------- Introduction to Threading Building Blocks, the parallel_for template, Range and Body concepts. Game of Life example. Overheads 171-187. Reading: from the TBB tutorial (available on the course webpage), sections 1.2, 3.1 and 3.2 (some of this may only make sense after the next lecture). Lecture 13 - 13.3.18 ------------------- MPI collective operations and communicator manipulation with MPI_Comm_split. Overheads 162-170. Reading: Foster (on-line) sections 8.3, 8.4 and 8.5. Lecture 12 - 9.3.18 ------------------- MPI, the "prime sieve" example, communication modes and probing for messages. Overheads 149-161. Reading: Foster (on-line) section 8.4, and a wealth of online examples by Googling "MPI communication modes". Lecture 11 - 27.2.18 -------------------- Principles and issues in message passing programming. Introduction to MPI, focusing on communicators and the parameters of the basic send and receive operations, with the Task Farm example. Overheads 130-148. Reading: The chapter on MPI in Foster's on-line textbook (link on the course web-page), particularly 8.1 and 8.2. The program sources are all on the course website. Lecture 10 - 16.2.18 -------------------- Java's model of concurrency, with the Thread class, and its built-in support for monitors. Discussion of coursework 2. Overheads 115-129. Reading: There are many Java threads tutorials on the web, our you could browse the "threads" section of pretty much any reasonably advanced Java textbook. The examples are on the course webpage, together with links to the (not examinable) material on the Java memory model. Lecture 9 - 13.2.18 ------------------- Introduction to the Pthreads API and some examples, including semaphores, locks monitors, and an implementation of a counter barrier. Overheads 97-114. Reading: See the Pthreads tutorial guide linked to from the course web page. The Pthreads programs are on the course web page. Why not mess around with them? Lecture 8 - 9.2.18 ------------------ The monitor concept, and its use in programming producers-consumers. The key test here is whether you understand why the "while" loop is necessary (in the buffer example) as a safety check on the "wait" calls. Overheads 90-96. Reading: The wikepedia page on monitors is good. One of the original papers on monitors, by Hoare, is on the course webpage. Lecture 7 - 6.2.18 ------------------ Semaphores and their application to mutual exclusion, barrier synchronisation and producer-consumer scenarios. Overheads 77-89. Reading: See the course page for a link to a nice tutorial on semaphores. The wikipedia page is good too. Lecture 6 - 2.2.18 ------------------ Barriers and barrier implementations: shared counter implementation with sense reversal. Symmetric Barriers. Dissemination Barriers. The main source of difficulty is the need to ensure reusability. Reading: See the paper by Mellor-Crummey and Scott, linked to from the course page, for more on various barrier implementations, including sense-reversing (3.1) and dissemination (3.3) and/or also the paper by Hensgen, Finkel and Manber, which discusses symmetric barriers (where they are called "Brooks Barrier" in section 2.2) and dissemination barriers (in section 2.4). NB you don't need to read the whole papers! Overheads 67-76. Lecture 5 - 30.1.18 ------------------- Lamport's "bakery" algorithm for critical sections. Overheads 55-66. Reading: Wikipedia is good and the course page has a link to Lamport's original paper. Lecture 4 - 26.1.18 ------------------- The Interacting Peers pattern. Two flavours of synchronisation. Specification of the critical section problem, solution with locks. Implementation of locks with spinning "read-and-write" atomic primitives (in our case "Test-and-Set", and "Test-and-Test-and-Set"). Overheads 37-54. Reading: See section 2.1 of the paper by Mellor-Crummey and Scott, linked to from the course page, for more on test-and-test-and-set. Lecture 3 - 23.1.18 ------------------- The Bag-of-Tasks and Pipeline patterns. Reading: Non-examinable material on the growing importance of patterns in parallel programming at "Parallel Computing with Patterns and Frameworks", Catanzaro & Keutzer and/or "Structured Parallel Programming with Deterministic Patterns", McCool (links to both on the course webpage). Overheads 24-36. Lecture 2 - 19.1.18 ------------------- An introduction to the "co", < > and "await" notation, and sequential consistency, with examples. Overheads 13-23. Reading: same as lecture 1, and also you can look at the course web page for a sheet of further "co" examples with solutions under the link "Some examples of the co notation in action" Lecture 1 - 16.1.18 ------------------- [NB there was no recording of this lecture] Introduction to the course, and a whistlestop tour of the world of parallel computer architecture, covering some of the nasty issues presented by the shared memory model, including weak consistency models and false sharing in the cache, and some architectural issues for the multicomputer model. Overheads 1-12. Reading: "The Free Lunch Is Over: A Fundamental Turn Toward Concurrency in Software", by Herb Sutter, link from the course webpage).