notes - School of Computer Science CS 343 Concurrent and...

Info iconThis preview shows pages 1–4. 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
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: School of Computer Science CS 343 Concurrent and Parallel Programming Course Notes Fall 2011 http: //www.student.cs.uwaterloo.ca / cs343 C++ download (installation: sudo sh u++-5.7.0.sh ) September 17, 2011 Outline An introduction to concurrent and parallel programming, with an emphasis on lan- guage constructs. Major topics include: exceptions, coroutines, atomic operations, critical sections, mutual exclusion, semaphores, high-level concurrency, deadlock, in- terprocess communication, process structuring, shared memory and distributed archi- tectures. Students will learn how to structure, implement and debug concurrent pro- grams. Permission is granted to make copies for personal or educational use. Contents Review : Static Multi-Exit/Multi-Level-Exit 1 1 Exceptions 5 1.1 Dynamic Multi-Level Exit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.2 Exception Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.3 Traditional EHM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.4 Execution Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 1.5 Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 1.6 Static Propagation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 1.7 Dynamic Propagation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 1.7.1 Termination . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 1.7.2 Resumption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 1.7.3 Recursive Resuming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 1.8 Additional features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 1.8.1 Derived Exception-Type . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 1.8.2 Catch-Any/Reraise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 1.8.3 Exception Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 1.8.4 Exception List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 2 Coroutine 19 2.1 Semi-Coroutine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 2.1.1 Fibonacci Sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 2.1.1.1 Direct . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 2.1.1.2 Routine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 2.1.1.3 Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 2.1.1.4 Coroutine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 2.1.2 Formatted Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 2.1.2.1 Direct . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 2.1.2.2 Routine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 2.1.2.3 Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 2.1.2.42....
View Full Document

This note was uploaded on 09/22/2011 for the course CS 343 taught by Professor Peterbuhr during the Fall '11 term at Waterloo.

Page1 / 189

notes - School of Computer Science CS 343 Concurrent and...

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

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