170 likes | 286 Views
What I Teach (Do what I say, not what I do). Andrew Lumsdaine Indiana University. B524: Parallelism in Programming Languages and Systems. Andrew Lumsdaine Computer Science Department Indiana University Bloomington, IN 47401. Course Text.
E N D
What I Teach(Do what I say, not what I do) Andrew Lumsdaine Indiana University
B524: Parallelism in Programming Languages and Systems Andrew Lumsdaine Computer Science Department Indiana University Bloomington, IN 47401
Course Text • Andrews, “Foundations of Multithreaded, Parallel, and Distributed Programming”
Supplemental Text • Schneider, “On Concurrent Programming”
Supplemental Texts • Andrews, Concurrent Programming
Course Outline • Introduction / overview • Program logic • Semantics of concurrency • Safety properties • Fine grained atomicity • Semaphores, locks, etc • Message passing • Case studies
{P Λ B} S {Q} {Pi} Si {Qi} are interference free {P} < await (B) S;> {Q} {P1 Λ P2 Λ … Pn} Co S1 ; // S2 … // Sn; oc {Q1 Λ Q2 Λ … Qn} Semantics of Concurrent Execution • Await Rule • Co Rule
Critical Section Problem sem mutex = 1; process CS[i = 1 to n] { while (true) { P(mutex); critical section; V(mutex); noncritical section; } }
Correctness? sem mx = 1; process CS[i = 1 to n] { while (true) { P(mx); critical section; V(mx); noncritical section; } } Is {I} preserved by P(mx)?