Terminating a Distributed Application
You’ll see a WHILE TRUE loop on line 14 of the multiplexor example and several similar loops in the bubble sorter. A WHILE TRUE loop doesn’t terminate, nor does any process enclosing it. How would you gracefully terminate such a perpetual application?
Distributed termination involves the termination of every constituent process. It’s very tempting to declare a global Boolean variable whose value would be checked by every repetitive process in the system before starting the next iteration. When the value of the variable changes, the processes will stop at once. Sadly, Occam doesn’t allow global variables.
Another distributed termination option is to connect each parallel process to a central control process ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access