Re:Biscuit: A monolithic, POSIX-subset operating system kern...
by pcwalton on Wednesday September 23, 2020 @09:34PM
(#24574420)
If "concurrency bugs" includes deadlocks, no, such a kernel would not be free of concurrency bugs. Any blocking receive operation on a channel can create deadlocks.
[ Parent
| on HN ]
Re:Biscuit: A monolithic, POSIX-subset operating system kern...
by robot on Thursday September 24, 2020 @07:56PM
(#24585061)
It will be free of concurrency bugs including deadlocks. This is the promise of CSP. The requirement is data is shared only via blocking IPC and never directly using a lock. (and similarly one must not share a pointer to private data, as another poster has pointed out)
You can compose small systems, even with multiple parties, prove they cannot deadlock, then make them a 'black box' with defined IO, and build larger, more complex systems with equal properties.
The downside is you must guard every piece of shared data with a separate thread, but there may be ways to reduce the performance penalty.