TABLE 3. 1: Should r2 Always be Set to new? Core cl Core C2 Comments SI: Store data= NEW: /*Initially, data=0& flag* SET*/ S2: Store flag= SET LI: Load rl= flag / LI bi may repeat many times * Bl:if(rl≠SET) goto LI L2: Load r2= data 所有coe执行的Load/ Store满足程序序 program order(<p) of Core CI memory order (<m) program order (<p) of Core C2 If l(a<p l(b)=>l(a) <m L(b) /*Load -> Store * LI: rl =flag:/0/ SI: data= NEW: A NEW"/ If L(a<p s(b)=>l(a)<m L(b) LI: rl s nae:/o' / Store ->Store * If s(a)<p s(b)=> s(a)<m s(b) LI: rl s nng: /0"/ SET: /SET/ /* Store→>Load为 LI: rl = flag: /SET/ If s(a <p l(b=> s(a)<m L(b) L2: r2= data: /NEw (2)对同一存储单元的Load操作的值来源于最近 一次写操作( global memory order)) lue of l(a)= value of Maxam[s(a)<m FIGURE3. 1: A Sequentially Consistent Execution of Table 3. 1I's Program L(a)}, MaXm表示最近的 memory order 2021/2/11 计算机体系结构 62021/2/11 计算机体系结构 6 (1) 所有core执行的Load/Store满足程序序 /* Load -> Load */ If L(a) <p L(b) => L(a) <m L(b) /*Load -> Store */ If L(a) <p S(b) => L(a) <m L(b) /* Store ->Store */ If S(a) <p S(b) => S(a) <m S(b) /* Store -> Load */ If S(a) <p L(b) => S(a) <m L(b) (2) 对同一存储单元的Load操作的值来源于最近 一次写操作(global memory order) Value of L(a) = Value of Max<m{S(a) <m L(a)}, Max<m表示最近的memory order