Lec13_FXStudy_Interference

Lec13_FXStudy_Interference - Illinois Institute of...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Interference CS 536 Notes, Lecture 13, Mon Nov 29, 2010 A. Why Shared memory parallel programs can interfere with each other. We want to Fnd a way to guarantee that combining sequential threads won’t cause interference. B. Outcomes After this lecture, you should Know what will be covered on the ±inal Exam. Know how to check for interference between the correctness proofs of the sequential threads of a shared memory parallel program. A. Final Exam Study Guide ±inal Exam: Monday December 6, 7:30 – 9:30 pm. Comprehensive exam (All percentages ²5%): 10% Quiz 1 material 10% Midterm (but not Quiz 1) material 30% Quiz 2 material 50% material since Quiz 2. This include expanding a partial proof outline to a full proof outline. Material Since Quiz 2 Given a partial proof outline, expand it to a full proof outline. Given a partial proof outline of a loop, Fnd a loop bound and give the extra conditions needed to show termination. (Or, expand the whole thing into a full outline.) Below, each starred section will have roughly the same number of points on the exam. Rough = anywhere from 5 to 15 points. ±ind an invariant By replacing a constant by a variable. Hint: Check manifest constants (e.g. 2) and named constants (does it change during the run of the program?) By dropping a (single) conjunct. Hint: Don’t forget that iterated relation tests are conjunctions: (a = b = c) is equivalent to (a = b b = c) . By adding a disjunct (our example took “=” to “ ”). Illinois Institute of Technology Notes for Lecture 13 CS 536: Science of Programming - 1 of 10 - © James Sasaki, 2010
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Array Assignments wp ( b[ e ]:= e , P ) involves substitution P [ e / b[ e ] ], which involves e [ e / b[ e ] for a general expression e . Calculating P [ e / b[ e ] ]: Easy case: e doesn’t contain b : then P [ e / b[ e ] ] is just P . Example: ( y[5] x )[ e / b[ e ] ] is y[5] x . Fairly easy case: e doesn’t contain b and P contains b[ e ] . (Note: the same subscript as on the l.h.s. of the assignment.) Then replace the b[ e ] inside P by e . Example: ( 2 * b[z+1] y )[ e / b[z+1] ] is 2 *( e ) y . General case: ( b[ e ] )[ e / b[ e ] ] is if e ₃′ = e then e else b[ e ₃′ ] fi , where e ₃′ is e [ e / b[ e ] ]. Example: ( y + b[y] z )([ b[y/2] / b[z+1] ]) is (y + (if y = z+1 then b[y/2] else b[y] fi) z) It can be helpful to statically simplify predicates involving conditional expressions. E.g., we can replace if B then e else e fi by just e . Evaluation Graphs for Parallel Programs; Disjoint Parallel Programs
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 10

Lec13_FXStudy_Interference - Illinois Institute of...

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

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