Act13_Interference

Act13_Interference - Illinois Institute of Technology Activities for Lecture 13 Interference Mon Activity 13.1 Interference A Why Interference

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

View Full Document Right Arrow Icon
Interference Mon Nov 29, 2010 Activity 13.1: Interference A. Why? Interference between threads can cause the threads to misbehave when run in parallel. B. Objectives At the end of today, you should: Be able to detect interference between two sequential threads. C. Questions For each of the following sets of threads, (a) list the triples to check for interference freedom, (b) say whether each triples is true or false, and (c) say whether the threads interfere or not. 1. { even(x) } x:= x+1 { odd(x) } and { x 0 } x:= x+2 { x 0 }. { even(x) x 0 } x:= x+1 { x 0 } { even(x) x 0 } x:= x+1 { x 0 } { x 0 even(x) } x:= x+2 { even(x) } { x 0 odd(x) } x:= x+2 { odd(x) } Are all true; there’s no interference. 2. { T } x:= 0 { x = 0 } and { x = 0 } x:= x+2 { x = 2 }. Does { T x = 0 } x:= 0 interfere with x = 0 (precondition of thread 2) { T x = 0 } x:= 0 { x = 0 } Does { T x = 0 } x:= 0 interfere with x = 2 (the postcondition of thread 2) { T x = 2 } x:= 0 { x = 2 } Does { x = 0 T } x:= x+2 interfere with T (the precondition of thread 1)? { x = 0
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/17/2011 for the course CS 536 taught by Professor Cs536 during the Fall '08 term at Illinois Tech.

Page1 / 3

Act13_Interference - Illinois Institute of Technology Activities for Lecture 13 Interference Mon Activity 13.1 Interference A Why Interference

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

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