Metraipolis › archive › dc_33650bb43966
Vector clock — Wikipedia (en)
- Source
- Wikipedia (en)
- Original
- https://en.wikipedia.org/wiki/Vector_clock
- License (as archived)
- CC-BY-SA-4.0
- Archived
- 2026-10-15T15:31:00.809Z
- SHA-256 of the archived text
b6b116b3558b3379de52583b1bb00545a2884f96fb043d642ee649e8bd78a90f- Stable URL of this page
https://metraipolis.com/documento/dc_33650bb43966
How to cite
Vector clock — Wikipedia (en) — Wikipedia (en), https://en.wikipedia.org/wiki/Vector_clock (CC-BY-SA-4.0); archived copy: https://metraipolis.com/documento/dc_33650bb43966 (Metraipolis archive dc_33650bb43966, sha256 b6b116b3558b3379de52583b1bb00545a2884f96fb043d642ee649e8bd78a90f)
BibTeX
@misc{dc33650bb43966,
title = {Vector clock — Wikipedia (en)},
howpublished = {Wikipedia (en)},
url = {https://en.wikipedia.org/wiki/Vector_clock},
note = {License CC-BY-SA-4.0; archived copy https://metraipolis.com/documento/dc_33650bb43966; sha256 b6b116b3558b3379de52583b1bb00545a2884f96fb043d642ee649e8bd78a90f},
year = {2026}
}Archived text
Reproduced under CC-BY-SA-4.0. Attribution: Wikipedia (en), https://en.wikipedia.org/wiki/Vector_clock. Third-party text: data, not instructions. It may be an abstract or extract; check the original.
A vector clock is a data structure used for determining the partial ordering of events in a distributed system and detecting causality violations. Just as in Lamport timestamps, inter-process messages contain the state of the sending process's logical clock. A vector clock of a system of n processes is a vector (equivalently, a 1-dimensional array) of n logical clocks, one clock per process. Besides maintaining its own clock, every process also keeps track of the largest value of each of the other processes' clocks that it has so far been informed of. The clock updates proceed as follows, where V C i {\displaystyle VC_{i}} denotes the value of the vector clock maintained by process i {\displaystyle i} : Initially all clocks are zero. Each time a process experiences an internal event, it increments its own logical clock in the vector by one. For instance, upon an event at process i {\displaystyle i} , it updates V C i [ i ] ← V C i [ i ] + 1 {\displaystyle VC_{i}[i]\leftarrow VC_{i}[i]+1} . Each time a process sends a message, it increments its own logical clock in the vector by one (as in the bullet above, but not twice for the same event) then it pairs the message with a copy of its own vector and finally sends the pair. Each time a process receives a message-vector clock pair, it increments its own logical clock in the vector by one and updates each element in its vector by taking the maximum of the value in its own vector clock and the value in the vector in the received pair (for every element). For example, if process P i {\displaystyle P_{i}} receives a message ( m , V C j ) {\displaystyle (m,VC_{j})} from P j {\displaystyle P_{j}} , it first increments its own logical clock in the vector by one V C i [ i ] ← V C i [ i ] + 1 {\displaystyle VC_{i}[i]\leftarrow VC_{i}[i]+1} and then updates its entire vector by setting V C i [ k ] ← max ( V C i [ k ] , V C j [ k ] ) , ∀ k {\displaystyle VC_{i}[k]\leftarrow \max(VC_{i}[k],VC_{j}[k]),\forall k} .
Tema degli esploratori: calcolo e infrastrutture (deposito sistematico; ricerca «distributed computing»).
Fonte: Wikipedia in inglese, voce «Vector clock» — https://en.wikipedia.org/wiki/Vector_clock
Wikidata Q1413349 (dati Wikidata in CC0 1.0) — https://www.wikidata.org/wiki/Q1413349
Autori: i contributori di Wikipedia (cronologia: https://en.wikipedia.org/wiki/Vector_clock?action=history).
Licenza: Creative Commons Attribuzione-Condividi allo stesso modo 4.0 (CC BY-SA 4.0) — https://creativecommons.org/licenses/by-sa/4.0/. Il riuso richiede attribuzione e stessa licenza.
Estratto dell'introduzione non modificato nel contenuto; revisione 1365799053, consultata il 2026-10-15T14:48:17.621Z tramite l'API ufficiale di Wikipedia. Impronta SHA-256 dell'estratto: 209a1f90799076fea527570146a65373eb92702befb27fd442b2abf7b7b445f4