COMP 409 Lecture Notes - Lecture 13: Branch Table, Partially Ordered Set, Interrupt

32 views7 pages

Document Summary

X = y = 0 (cid:1379) (cid:1378) r1 = x; do { do { r2 = y; There are two data races, but once the justi cation process is applied and a real happens-before graph is built up from the actual runtime trace, we end up with a well-behaved execution. As such, we get two infinite loops, making the y = 42; and x = 42; useless, and removing the data races. The program is correctly synchronized, but in a subtle way. Last time: java memory model, data race free (cid:314) sequential consistency, not data race free (cid:314) complex process . Example: do { r1 = x; x = y = 0 (cid:1379) (cid:1378) do { r2 = y; This is data race free, because there are no data races in the runtime. } while (r2 == 0); x = 42; Integrate multithreading and memory models issues in c++

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers