Wait-Free Concurrent Data Access for Real-Time Systems
摘要
In the context of manufacturing, the implementation of modular software necessitates the establishment of real-time inter-process communication between different real-time modules operating within a singular compute node. The act of sharing or passing data between processes has been identified as a well-known challenge in concurrent programming. Concurrent data access on multi-core processors has the potential to result in data inconsistencies when multiple processes concurrently read and write data. As demonstrated in the existing literature, there are multiple methodologies for concurrent data access. In the context of real-time systems, the property of wait-freeness, which guarantees time-bounded access to data, is paramount. This property enables access to shared data that is not dependent on the scheduler. In this paper, we analyze wait-free data structures for two common communication patterns: single-shared-value and firms-in-first-out queues. A comparison of suitable approaches is facilitated by implementing them in Rust and conducting a benchmarking analysis. The benchmark reveals discrepancies in performance that are primarily attributable to cache interference. The findings of this study demonstrate that triple buffers are characterized by wait-free operation and are well-suited for single-shared-value queues. The wait-free FastForward queue is a suitable FIFO queue that also performs optimally in our benchmarks.