The weakest model of consistency for shared memory is local consistency, which requires only that a process observe its own operations in program order, and places no restrictions on how a process sees the operations performed by any other process.
Getting an intuition for how different consistency models behave can be difficult, so I am working on these random little sandboxes to play around with different models. You can edit the program below to play with different operations. As a limitation of my execution enigne, every S-expression is executed atomically, while different expressions may be executed in different orders at each execution. So you might want to run your program multiple times to see how it changes the resulting execution.
There are a few different functions supported:
- (machine statements…) - Defines a node in the distributed program that runs each statement in
statements in order
- (put key value) - stores
value in global memory at the location specified by
- (get key) - reads the value from global memory at the location specified by
- (wait key value) - delays progress in this node until the value in global memory at the location specified by
- (clk) - displays the vector clock for this machine
- (die) - puts the machine in a failed state, where it makes no more progress