Groups of Processes That All Die Together
Often you’ll want to create groups of processes that all die together. This is a very useful invariant for arguing about the behavior of a system. When processes collaborate to solve a problem and something goes wrong, we can sometimes recover, but if we can’t recover, we just want to stop everything we were doing. This is rather like the notion of a transaction: either the processes do what they were supposed to do or they are all killed.
Assume we have some linked processes and that one of the linked
processes dies. For example, see P9 in the following
figure. The left side of the figure shows how the
processes are linked before P9 dies. The
right side shows which process are still alive after
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