Alle boeken

Professioneel

Apps Over Coach Inloggen Begin met lezen

Computer Science · Begrippenlijst

Wat is Chandy–Lamport algorithm?

Ook bekend als: Chandy--Lamport algorithm

Definition 25.11 University Computer Science — Year 3 · Hoofdstuk 25 — Distributed Systems: Time, Failures and Remote Calls

In the Chandy–Lamport algorithm, a process starts a snapshot by recording its own state and sending a special message, a marker, on each of its outgoing channels. When a process receives a marker on a channel: if it has not yet recorded its state, it records it, records the channel the marker came on as empty, sends a marker on each outgoing channel, and starts recording every other incoming channel; if it had already recorded its state, it stops recording that channel, whose state is the messages it received on it since it recorded its own state. The snapshot is complete when every process has received a marker on every incoming channel.

Chandy–Lamport on three branches. B1 starts; the squares are the moments the branches record their balances, shown beside them, and markers are dashed. The transfer of 20, sent before B1 recorded and received before B3 did, is in B3’s recorded balance. The transfer of 30 left B2 before B2 recorded and reached B1 in the shaded stretch, after B1 recorded and before B2’s marker: it is the recorded state of the channel from B2 to B1.
Chandy–Lamport on three branches. B1 starts; the squares are the moments the branches record their balances, shown beside them, and markers are dashed. The transfer of 20, sent before B1 recorded and received before B3 did, is in B3’s recorded balance. The transfer of 30 left B2 before B2 recorded and reached B1 in the shaded stretch, after B1 recorded and before B2’s marker: it is the recorded state of the channel from B2 to B1.
Lees in het hoofdstuk →