Skip to content

Commit 182dad3

Browse files
More thoughts
1 parent 6ef899b commit 182dad3

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

rfcs/46-atomic-groups.md

+32
Original file line numberDiff line numberDiff line change
@@ -190,10 +190,42 @@ Systems `A` and `C` do not share an atomic group, and data that is virtually loc
190190

191191
This reduces the risk of an unsatisfiable schedule by allowing locks to be released in a maximally permissive fashion.
192192

193+
### Is atomicity transitive?
194+
195+
In other words, can we "chain" atomicity between groups in meaningful ways?
196+
197+
**Yes, both isolated and coherent atomicity are transitive. Mixing the two causes the larger group to become coherent.**
198+
199+
Suppose that we have two atomic groups `X = {A, B}` and `Y = {B, C}`, where `X` runs before `Y`.
200+
From an outside perspective, does the collection of `X` and `Y` look as though it's atomic?
201+
202+
Let's walk through what happens.
203+
204+
1. `X` begins, applying a virtual lock on the data for `A` and `B`.
205+
2. `Y` checks if it can run, checking the locks for `B` and `C`.
206+
1. If `B` is compatible with itself (as it only reads data), we can immediately begin `Y`.
207+
2. If `B` is not compatible with itself:
208+
1. If `X` is coherent, the locks are released as `X` completes.
209+
210+
### Are atomic groups strictly hierachical?
211+
212+
**For isolated groups, the answer is "effectively yes". For coherent groups however "surprisingly, no!".**
213+
214+
This is conceptually important, as it shapes the API users should use to interact with atomic groups.
215+
216+
Suppose that we have a minimal pair of two atomic groups `X = {A, B}` and `Y = {B, C}`, where `A`, `B` and `C` are distinct systems.
217+
Atomic groups must be strictly hierarchical if-and-only if the schedule is unsatisfiable.
218+
219+
TODO: Complete.
220+
221+
### Scheduling
222+
193223
### Unsatisfiability
194224

195225
This RFC adds an additional satisfiability constraint: if a data access is required during the execution of an atomic group, the requesting system's data access must be compatible with the data accesses of that group at the appropriate time.
196226

227+
TODO: Complete.
228+
197229
## Drawbacks
198230

199231
- This is a complex feature! It exposes the details of scheduling and locking to the end user.

0 commit comments

Comments
 (0)