Promising-ARM/RISC-V a simpler and faster operational concurrency model an equivalent simpler and faster presentation of ARMv8/RISC-V Christopher Pulte 1 Jean Pichon-Pharabod 1 Jeehoon Kang 2 Sung-Hwan Lee 3 Chung-Kil Hur 3 24 June 2019 1 University of Cambridge 2 Korea Advanced Institute of Science and Technology 3 Seoul National University
45
Embed
Promising-ARM/RISC-V - a simpler and faster operational ... · Promising-ARM/RISC-V a simpler and faster operational concurrency model an equivalent simpler and faster presentation
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Promising-ARM/RISC-Va simpler and faster operational concurrency modelan equivalent simpler and faster presentation of ARMv8/RISC-V
Christopher Pulte 1 Jean Pichon-Pharabod 1 Jeehoon Kang 2 Sung-Hwan Lee 3 Chung-Kil Hur 3
24 June 2019
1University of Cambridge
2Korea Advanced Institute of Science and Technology
Axiomatic• o�cial reference model+ abstract, concise- not incremental: global axioms
Flat operational• proved equivalent+ incremental+ ISA, mixed-size support+ closer relation to H/W- complex
Promising-ARM/RISC-V inspired by Promising C11 [Kang et al]+ simple, incremental+ Coq equivalence proof with Axiomatic (excl. ISA model)+ ISA support- no mixed-size support yet+ fast enough for checking data structure examples
2
ARMv8/RISC-V concurrency
Axiomatic• o�cial reference model+ abstract, concise- not incremental: global axioms
Flat operational• proved equivalent+ incremental+ ISA, mixed-size support+ closer relation to H/W- complex
Promising-ARM/RISC-V inspired by Promising C11 [Kang et al]+ simple, incremental+ Coq equivalence proof with Axiomatic (excl. ISA model)+ ISA support- no mixed-size support yet+ fast enough for checking data structure examples
2
Model overview
Out-of-order readsIdea 1: out-of-order read executionby reading from message history
T1store D := 42store F := 1
T2r1 = load F //reads 1if (r1 == 1) then
r2 = load D //reads 0else
..
T1.regs: . . .T1.promises: . . .
. . .
T2.regs:T2.promises: . . .
. . .
memory:
3
Out-of-order readsIdea 1: out-of-order read executionby reading from message history
Language concurrency models:no accepted thin-air free semantics
Machine concurrency models:better understood,compiler-independent toolsthat support hand-written assembly
ARMv8: widely used, subtle concurrency semanticsRISC-V: recently adopted similar model
14
Out-of-order writesWrite ordering with views
T1store D := 42store[rel] F := 1
T2r1 = load F //reads 1if (r1 == 1) then
r2 = load (D+r1-r1) //reads 0else
..
T1.regs: . . .T1.promises:
T1.vwm:. . .
T2.regs: . . .T2.promises: . . .
T2.vwm: . . .. . .
memory:
15
Out-of-order writesWrite ordering with views
T1store D := 42store[rel] F := 1
T2r1 = load F //reads 1if (r1 == 1) then
r2 = load (D+r1-r1) //reads 0else
..
T1.regs: . . .T1.promises: ∅
T1.vwm: 0. . .
T2.regs: . . .T2.promises: . . .
T2.vwm: . . .. . .
memory: (init)@0 15
Out-of-order writesWrite ordering with views
T1store D := 42store[rel] F := 1
T2r1 = load F //reads 1if (r1 == 1) then
r2 = load (D+r1-r1) //reads 0else
..
T1.regs: . . .T1.promises: (F = 1)@1
T1.vwm: 0. . .
T2.regs: . . .T2.promises: . . .
T2.vwm: . . .. . .
memory: (init)@0, (F = 1)@1 15
Out-of-order writesWrite ordering with views
T1store D := 42store[rel] F := 1
T2r1 = load F //reads 1if (r1 == 1) then
r2 = load (D+r1-r1) //reads 0else
..
T1.regs: . . .T1.promises: (F = 1)@1
T1.vwm: 2. . .
T2.regs: . . .T2.promises: . . .
T2.vwm: . . .. . .
memory: (init)@0, (F = 1)@1, (D = 42)@2 15
Out-of-order writesWrite ordering with views
T1store D := 42store[rel] F := 1
T2r1 = load F //reads 1if (r1 == 1) then
r2 = load (D+r1-r1) //reads 0else
..
T1.regs: . . .T1.promises: (F = 1)@1
T1.vwm: 2. . .
T2.regs: . . .T2.promises: . . .
T2.vwm: . . .. . .
memory: (init)@0, (F = 1)@1, (D = 42)@2 15
Prevent executions with unful�lled promiseswith certi�cation.
For every step by thread T, do simple thread-local check: ensurethere exists trace by T executing in program-order,alone, under current memory ful�lling all its promises.