正在加载图片...
Understanding Program Order -Example 1 Initially X= 2 P1 P2 rO=Read(X 1=Read(x) r0=r0+1 1=r1+1 Write(ro, X) Write(rl,x) Possible execution sequences. Pl: rO=Read(X) P2: r1=Read(X) P2: r1=Read ( X P2:r1=r1+1 P:r0=r0+1 P2: Write(r1,x) P1: Write(ro,X) Pl: rO=Read (X P2:r1=r1+1 P1:r0=r0+1 P2: Write(r1, x) Pl: Write(ro,X) X=3 X=4Understanding Program Order – Example 1 • Initially X = 2 P1 P2 ….. ….. r0=Read(X) r1=Read(x) r0=r0+1 r1=r1+1 Write(r0,X) Write(r1,X) ….. …… • Possible execution sequences: P1:r0=Read(X) P2:r1=Read(X) P2:r1=Read(X) P2:r1=r1+1 P1:r0=r0+1 P2:Write(r1,X) P1:Write(r0,X) P1:r0=Read(X) P2:r1=r1+1 P1:r0=r0+1 P2:Write(r1,X) P1:Write(r0,X) x=3 x=4 2021/2/2 计算机体系结构 24
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有