正在加载图片...
Interference Example: y=x+1; y=x+1; X=y+1 X:=X+1 Suppose initially x=ay =0.What are the possible results? (1)y=1,×=2:(2)y=1,x=3;(3)y=3,×=3;(4)y=2,×=3 Two commands co and c are said to interfere if: (fv(co)n fa(c))U (fv(c1)n fa(co)) If co and c interfere,we say there are race conditions(or races)in Co ll C1. When co and ci do not interfere,nor terminate by failure,the concurrent composition co ll c1 is determinate. Xinyu Feng Shared-Variable Concurrency Interference Example: y := x + 1 ; x := y + 1 k y := x + 1 ; x := x + 1 Suppose initially σx = σy = 0. What are the possible results? (1)y = 1, x = 2; (2)y = 1, x = 3; (3)y = 3, x = 3; (4)y = 2, x = 3 Two commands c0 and c1 are said to interfere if: (fv(c0) ∩ fa(c1)) ∪ (fv(c1) ∩ fa(c0)) , ∅ If c0 and c1 interfere, we say there are race conditions (or races) in c0 k c1. When c0 and c1 do not interfere, nor terminate by failure, the concurrent composition c0 k c1 is determinate. Xinyu Feng Shared-Variable Concurrency
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有