Each available worker sends a request for work to the boss. The boss replies with a cook request , and the worker replies when the cook request is finished. The boss is also a worker, and can request work of itself. Crashes Many distributed systems detect crashes by timeouts . In our system, we simulate crashes by sending special replies.
All workers send requests for work to the current boss.
If a worker detects that the boss has crashed then it holds an election to find the new boss. If a boss detects that a worker has crashed, then it doesn't care. When the worker recovers and is ready for work again, it will send a work request. An election reply is used to reply to the junior nodes whether the senior node is alive. The lower a node's rank, the more senior it is.