Concurrency Algorithms and Theories 05 The C11 memory model

The C/C++ memory model

n o n − a t o m i c ⊏      r e l a x e d      ⊏      r e l e a s e / a c q u i c e      ⊏ s c non-atomic \sqsubset \; \; relaxed \; \; \sqsubset \; \; release/acquice \;\; \sqsubset sc nonatomicrelaxedrelease/acquicesc

C11 model through examples

image-20221025204329743

Synchronizes-withs relation

image-20221025204411836

Catch-fire semantics

Definition

给定一个C11的执行图G,我们称两个事件a,b,是C11冲突的当

  • a ≠ \ne = b
  • loc(a) = loc(b)
  • {typ(a),typ(b)} ∩ \cap {W,RMW} ≠ ∅ \ne \emptyset =
  • na ∈ \in {mod(a),mod(b)}
  • ⟨ a , b ⟩ ∈ h b      ⟨ b , a ⟩ ∉ h b \lang a,b \rang \in hb \; \; \lang b,a \rang \notin hb a,bhbb,a/hb

那么成G是C11-racy, 当G的事件a,b发生C11race

C11 consistency

C11下的一致性

image-20221025204833602

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值