2 ms·
Some ivory tower nut proved in the 70s that semaphore-and-thread was logically equivalent to queue-and-message, i.e. the same results could be obtained by each.
by JoeAltmaier 11y ago
Some ivory tower nut proved in the 70s that semaphore-and-thread was logically equivalent to queue-and-message, i.e. the same results could be obtained by each.
But queue-and-message is superior in very many ways. Done carefully, you have only the queue as a shared structure. If message processors are non-blocking then the entire system is non-blocking. Deadlock can be statically determined by examination of the message vectors.
And last but certainly not least, in the debugger, all important state is in the message or local variables in a message processor. No enormous stacks to dive through, trying to find who did what to whom. Simple single-threaded message processors have straightforward logic. And a message-aware operating system can make the work queues transparent.