Download PDFOpen PDF in browser

Race-Condition-Robust Hardware-Software Equivalence in *n*x

12 pagesPublished: December 11, 2023


Classic CSP communication channels behave equivalently whether connecting software processes or hardware devices. The static OCCAM language and the Transputer proces- sor, both based on finite CSP, exhibit this property, which results in Hardware-Software Equivalence between implementation of the same programs (including binaries). Programs written in OCCAM and run on the Transputer can be proven correct and their behavior characterized down to cycle count.
This Fringe presentation shows a technique for extending this HSE to *n*x processes and devices in certain applications. Wherever certain capabilities of the ssh suite of pro- grams are found, it works to allow communication using sockets as the communicators known to the programs. An ssh tunnel between sockets on separate devices allows this to work in the hardware case, without any change in the programs including their binaries. Among the *n*x varieties we have shown to work are Linux, Mac BSD, and Termux over Android.
The technique passes short messages via a server program. An investigation of race conditions, using the property of select() that it always finds a winner among file descriptor communication races, proves that the communication is robust across all possible timing differences between communicating client pairs.
The current code works if two of the clients are communicating at a time. It requires further development before handling three independent racing systems.

Keyphrases: *n*x, hardware-software equivalence, Linux, race condition, SSH

In: Lindsay Quarrie (editor). Proceedings of 2023 Concurrent Processes Architectures and Embedded Systems Hybrid Virtual Conference, vol 17, pages 69--80

BibTeX entry
  author    = {Larry Dickson},
  title     = {Race-Condition-Robust Hardware-Software Equivalence in *n*x},
  booktitle = {Proceedings of 2023 Concurrent Processes Architectures and Embedded Systems Hybrid Virtual Conference},
  editor    = {Lindsay Quarrie},
  series    = {Kalpa Publications in Computing},
  volume    = {17},
  pages     = {69--80},
  year      = {2023},
  publisher = {EasyChair},
  bibsource = {EasyChair,},
  issn      = {2515-1762},
  url       = {},
  doi       = {10.29007/zw3x}}
Download PDFOpen PDF in browser