|
|
|
|
|
by HALtheWise
1871 days ago
|
|
The article ends with this nugget about C++ shared memory state management, but I don't have the background to know exactly what they're referring to. Does anyone recognize this pattern and feel able to explain it to mere mortals? > “We also have different tools so that any state that is persisted through the application is managed in a very particular place in memory. This lets us know it is being properly shared between the computers. What you don’t want is a situation where one of the computers takes a radiation hit, a bit flips, and it’s not in a shared memory with the other computers, and it can kind of run off on its own.” |
|
They have one address range for shared (i.e. subject to syncing across all replicas) memory, and a separate one for non-shared (single-replica) memory.
Cross-replica data is presumably subject to their agreement algorithm, checking that the different computers reach the same (within some error bars) results; you want to arrange things so that there are frequent checkpoints at which the conflict resolution system can say "a bad write happened at this point, I should disregard whatever this computer said from that point until it recovers".
i.e. you want local memory to use as scratch space for performance reasons, but to make sure that there isn't a long runway for errors to happen and decisions to be made before the shared-memory checker notices a mistake. To ensure this happens, you want manual control over which memory allocator handles which data.