Reconstructing Concurrency Invariants Through Medieval East Asian Logic
5 days ago
- Computation theory discussions often focus on Western formal systems, overlooking non-Western contributions that are relevant to modern computing.
- East Asia's Middle Period (11th–14th centuries) had structural frameworks similar to deterministic state machines, influenced by Islamic science.
- Concurrent deallocation of shared memory in C11 can lead to race conditions like double frees or use-after-free, requiring careful visibility revocation before reclamation.
- Four methods (鈥/The Four Methods) model concurrency: method 1 uses compare-exchange to safely unlink pointers before freeing; method 2 shows asymmetric unlink with barriers; method 3 demonstrates a use-after-free hazard; method 4 illustrates a race from using memset without coordination.
- Epoch-based reclamation and RCU principles align with the idea of unlinking before reclaiming memory to prevent data races.
- The verdict recommends a canonical approach: sever visibility paths first, synchronize, then deallocate; asymmetric cases are allowed in strict pipelines.
- The Middle-Period framework offers a symbolic vocabulary for memory safety, treating memory as substance with controlled visibility and lifetime.