Presentation is loading. Please wait.

Presentation is loading. Please wait.

What I Teach (Do what I say, not what I do)

Similar presentations


Presentation on theme: "What I Teach (Do what I say, not what I do)"— Presentation transcript:

1 What I Teach (Do what I say, not what I do)
Andrew Lumsdaine Indiana University

2

3 B524: Parallelism in Programming Languages and Systems
Andrew Lumsdaine Computer Science Department Indiana University Bloomington, IN

4 Course Text Andrews, “Foundations of Multithreaded, Parallel, and Distributed Programming”

5 Supplemental Text Schneider, “On Concurrent Programming”

6 Supplemental Texts Andrews, Concurrent Programming

7

8 Course Outline Introduction / overview Program logic
Semantics of concurrency Safety properties Fine grained atomicity Semaphores, locks, etc Message passing Case studies

9 Semantics of Concurrent Execution
Await Rule Co Rule {P Λ B} S {Q} {P} < await (B) S;> {Q} {Pi} Si {Qi} are interference free {P1 Λ P2 Λ … Pn} Co S1 ; // S2 … // Sn; oc {Q1 Λ Q2 Λ … Qn}

10 Critical Section Problem
sem mutex = 1; process CS[i = 1 to n] { while (true) { P(mutex); critical section; V(mutex); noncritical section; }

11 Correctness? sem mx = 1; Is {I} preserved by P(mx)?
process CS[i = 1 to n] { while (true) { P(mx); critical section; V(mx); noncritical section; } Is {I} preserved by P(mx)?

12 Correctness

13 Correctness

14 Correctness

15 Correctness

16 Correctness

17


Download ppt "What I Teach (Do what I say, not what I do)"

Similar presentations


Ads by Google