Vector clock

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 an array/vector of N logical clocks, one clock per process; a local "largest possible values" copy of the global clock-array is kept in each process.

Denote as the vector clock maintained by process , the clock updates proceed as follows:[1]

Example of a system of vector clocks. Events in the blue region are the causes leading to event B4, whereas those in the red region are the effects of event B4.
  • 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 , it updates .
  • 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 receives a message from , it first increments its own logical clock in the vector by one and then updates its entire vector by setting .

History

Lamport originated the idea of logical Lamport clocks in 1978.[2] However, the logical clocks in that paper were scalars, not vectors. The generalization to vector time was developed several times, apparently independently, by different authors in the early 1980s.[3] At least 6 papers contain the concept. [4] The papers canonically cited in reference to vector clocks are Colin Fidge’s and Friedemann Mattern’s 1988 works, [5][6] as they (independently) established the name "vector clock" and the mathematical properties of vector clocks.[3]

Partial ordering property

Vector clocks allow for the partial causal ordering of events. Defining the following:

  • denotes the vector clock of event , and denotes the component of that clock for process .
    • In English: is less than , if and only if is less than or equal to for all process indices , and at least one of those relationships is strictly smaller (that is, ).
  • denotes that event happened before event . It is defined as: if , then

Properties:

  • Antisymmetry: if , then ¬
  • Transitivity: if and , then ; or, if and , then

Relation with other orders:

  • Let be the real time when event occurs. If , then
  • Let be the Lamport timestamp of event . If , then

Other mechanisms

  • In 1999, Torres-Rojas and Ahamad developed Plausible Clocks,[7] a mechanism that takes less space than vector clocks but that, in some cases, will totally order events that are causally concurrent.
  • In 2005, Agarwal and Garg created Chain Clocks,[8] a system that tracks dependencies using vectors with size smaller than the number of processes and that adapts automatically to systems with dynamic number of processes.
  • In 2008, Almeida et al. introduced Interval Tree Clocks.[9][10][11] This mechanism generalizes Vector Clocks and allows operation in dynamic environments when the identities and number of processes in the computation is not known in advance.
  • In 2019, Lum Ramabaja proposed Bloom Clocks, a probabilistic data structure based on Bloom filters.[12][13][14] Compared to a vector clock, the space used per node is fixed and does not depend on the number of nodes in a system. Comparing two clocks either produces a true negative (the clocks are not comparable), or else a suggestion that one clock precedes the other, with the possibility of a false positive where the two clocks are unrelated. The false positive rate decreases as more storage is allowed.

See also

References

  1. ^ "Distributed Systems 3rd edition (2017)". DISTRIBUTED-SYSTEMS.NET. Retrieved 2021-03-21.
  2. ^ Lamport, L. (1978). "Time, clocks, and the ordering of events in a distributed system" (PDF). Communications of the ACM . 21 (7): 558–565. doi:10.1145/359545.359563. S2CID 215822405.
  3. ^ a b Schwarz, Reinhard; Mattern, Friedemann (March 1994). "Detecting causal relationships in distributed computations: In search of the holy grail". Distributed Computing. 7 (3): 149–174. doi:10.1007/BF02277859. S2CID 3065996.
  4. ^ Kuper, Lindsey (8 April 2023). "Who invented vector clocks?". decomposition ∘ al. The papers are (in chronological order):
    • Fischer, Michael J.; Michael, Alan (1982). "Sacrificing serializability to attain high availability of data in an unreliable network". Proceedings of the 1st ACM SIGACT-SIGMOD symposium on Principles of database systems - PODS '82. p. 70. doi:10.1145/588111.588124. ISBN 0897910702. S2CID 8774876.
    • Parker, D.S.; Popek, G.J.; Rudisin, G.; Stoughton, A.; Walker, B.J.; Walton, E.; Chow, J.M.; Edwards, D.; Kiser, S.; Kline, C. (May 1983). "Detection of Mutual Inconsistency in Distributed Systems". IEEE Transactions on Software Engineering. SE-9 (3): 240–247. doi:10.1109/TSE.1983.236733. S2CID 2483222.
    • Wuu, Gene T.J.; Bernstein, Arthur J. (1984). "Efficient solutions to the replicated log and dictionary problems". Proceedings of the third annual ACM symposium on Principles of distributed computing - PODC '84. pp. 233–242. doi:10.1145/800222.806750. ISBN 0897911431. S2CID 2384672.
    • Strom, Rob; Yemini, Shaula (August 1985). "Optimistic recovery in distributed systems". ACM Transactions on Computer Systems. 3 (3): 204–226. doi:10.1145/3959.3962. S2CID 1941122.
    • Schmuck, Frank B. (November 1985). Software clocks and the order of events in a distributed system (unpublished).
    • Liskov, Barbara; Ladin, Rivka (1986). "Highly available distributed services and fault-tolerant distributed garbage collection". Proceedings of the fifth annual ACM symposium on Principles of distributed computing - PODC '86. pp. 29–39. doi:10.1145/10590.10593. ISBN 0897911989. S2CID 16148617.
    • Raynal, Michel (February 1987). "A distributed algorithm to prevent mutual drift between n logical clocks". Information Processing Letters. 24 (3): 199–202. doi:10.1016/0020-0190(87)90186-4.
  5. ^ Fidge, Colin J. (February 1988). "Timestamps in message-passing systems that preserve the partial ordering" (PDF). In K. Raymond (ed.). Proceedings of the 11th Australian Computer Science Conference (ACSC'88). Vol. 10. pp. 56–66. Retrieved 2009-02-13.
  6. ^ Mattern, Friedemann (October 1988). "Virtual Time and Global States of Distributed systems". In Cosnard, M. (ed.). Proc. Workshop on Parallel and Distributed Algorithms. Chateau de Bonas, France: Elsevier. pp. 215–226.
  7. ^ Francisco Torres-Rojas; Mustaque Ahamad (1999), "Plausible clocks: constant size logical clocks for distributed systems", Distributed Computing, 12 (4): 179–195, doi:10.1007/s004460050065, S2CID 2936350
  8. ^ Agarwal, Anurag; Garg, Vijay K. (17 July 2005). "Efficient dependency tracking for relevant events in shared-memory systems" (PDF). Proceedings of the twenty-fourth annual ACM symposium on Principles of distributed computing. Association for Computing Machinery. pp. 19–28. doi:10.1145/1073814.1073818. ISBN 1-58113-994-2. S2CID 11779779. Retrieved 21 April 2021.
  9. ^ Almeida, Paulo; Baquero, Carlos; Fonte, Victor (2008), "Interval Tree Clocks: A Logical Clock for Dynamic Systems", in Baker, Theodore P.; Bui, Alain; Tixeuil, Sébastien (eds.), Principles of Distributed Systems (PDF), Lecture Notes in Computer Science, vol. 5401, Springer-Verlag, Lecture Notes in Computer Science, pp. 259–274, Bibcode:2008LNCS.5401.....B, doi:10.1007/978-3-540-92221-6, ISBN 978-3-540-92220-9
  10. ^ Almeida, Paulo; Baquero, Carlos; Fonte, Victor (2008), "Interval Tree Clocks: A Logical Clock for Dynamic Systems", Interval Tree Clocks: A Logical Clock for Dynamic Systems, Lecture Notes in Computer Science, vol. 5401, p. 259, doi:10.1007/978-3-540-92221-6_18, hdl:1822/37748, ISBN 978-3-540-92220-9
  11. ^ Zhang, Yi (2014), "Background Preliminaries: Interval Tree Clock Results", Background Preliminaries: Interval Tree Clock Results (PDF)
  12. ^ Pozzetti, Tommaso; Kshemkalyani, Ajay D. (1 April 2021). "Resettable Encoded Vector Clock for Causality Analysis With an Application to Dynamic Race Detection". IEEE Transactions on Parallel and Distributed Systems. 32 (4): 772–785. doi:10.1109/TPDS.2020.3032293. S2CID 220362525.
  13. ^ Lum Ramabaja (2019), The Bloom Clock, arXiv:1905.13064, Bibcode:2019arXiv190513064R
  14. ^ Kulkarni, Sandeep S; Appleton, Gabe; Nguyen, Duong (4 January 2022). "Achieving Causality with Physical Clocks". Proceedings of the 23rd International Conference on Distributed Computing and Networking. pp. 97–106. arXiv:2104.15099. doi:10.1145/3491003.3491009. ISBN 9781450395601. S2CID 233476293.

Read other articles:

Questa voce o sezione sugli argomenti anime e manga e fantascienza è ritenuta da controllare. Motivo: Se la serie è inedita in Italia, la pagina non dovrebbe essere rinominata Tetsuwan Atomu (serie animata 1963)? Partecipa alla discussione e/o correggi la voce. Segui i suggerimenti dei progetti di riferimento 1, 2. Astro Boy, Astroboy鉄腕アトム(Tetsuwan Atomu) Serie TV animeAutoreOsamu Tezuka RegiaOsamu Tezuka SoggettoYoshiyuki Tomino SceneggiaturaYoshiyuki Tomino MusicheTatsuo T…

土库曼斯坦总统土库曼斯坦国徽土库曼斯坦总统旗現任谢尔达尔·别尔德穆哈梅多夫自2022年3月19日官邸阿什哈巴德总统府(Oguzkhan Presidential Palace)機關所在地阿什哈巴德任命者直接选举任期7年,可连选连任首任萨帕尔穆拉特·尼亚佐夫设立1991年10月27日 土库曼斯坦土库曼斯坦政府与政治 国家政府 土库曼斯坦宪法 国旗 国徽 国歌 立法機關(英语:National Council of Turkmenistan) 土…

Elena FavilliElena FavilliLahir03 Agustus 1982 (umur 41)Montevarchi, Toscana, ItaliaAlmamaterUniversitas Bologna, Universitas California, BerkeleyPekerjaanCEO dan Pendiri Rebel GirlsDikenal atasPengarang dan pembuat Good Night Stories for Rebel Girls Elena Favilli (lahir 3 Agustus 1982 di Montevarchi, Toscana, Italia) adalah seorang pengarang berpenjualan terbaik, jurubicara, wirausahawati dan pemimpin feminis liberal. Elena Favilli adalah pendiri dan CEO perusahaan media digital Rebel Girl…

Частина серії проФілософіяLeft to right: Plato, Kant, Nietzsche, Buddha, Confucius, AverroesПлатонКантНіцшеБуддаКонфуційАверроес Філософи Епістемологи Естетики Етики Логіки Метафізики Соціально-політичні філософи Традиції Аналітична Арістотелівська Африканська Близькосхідна іранська Буддійсь…

Reinhard GenzelReinhard Genzel en 2012.BiographieNaissance 24 mars 1952 (72 ans)Bad Homburg vor der Höhe (Hesse)Nationalité AllemandFormation Université rhénane Frédéric-Guillaume de Bonn (jusqu'en 1975)Université de Fribourg-en-BrisgauBerthold-Gymnasium Freiburg (d)Activités Astronome, astrophysicien, professeur d'université, scientifiquePère Ludwig Genzel (d)Autres informationsA travaillé pour Université Louis-et-Maximilien de MunichHarvard-Smithsonian Center for AstrophysicsU…

Цю статтю потрібно повністю переписати відповідно до стандартів якості Вікіпедії. Причина — це не відомча інструкція, а стаття енциклопедії. Ви можете допомогти, переробивши її. Можливо, сторінка обговорення містить зауваження щодо потрібних змін. (листопад 2015) Ця…

Artikel ini sebatang kara, artinya tidak ada artikel lain yang memiliki pranala balik ke halaman ini.Bantulah menambah pranala ke artikel ini dari artikel yang berhubungan atau coba peralatan pencari pranala.Tag ini diberikan pada Januari 2023. Dalam sistem gua, zona epifreatik adalah zona antara zona vadosa diatasnya dan zona freatik dibawahnya. Karena sering kebanjiran, zona ini memiliki porositas yang signifikan. Zona ini memiliki potensi besar untuk menjadi sebuah gua.[1] Referensi ^…

Pour les articles homonymes, voir Balibar. Étienne BalibarÉtienne Balibar en 2014BiographieNaissance 23 avril 1942 (82 ans)AvallonNationalité françaiseFormation École normale supérieureActivité PhilosophePère Jean BalibarMère Renée BalibarFratrie Sébastien BalibarConjoint Françoise BalibarEnfant Jeanne BalibarAutres informationsA travaillé pour Université de ParisUniversité de Californie à IrvineUniversité KingstonParti politique Parti communiste français (1961-1981)Mouvem…

United States Air Force general Jay W. KelleyBorn (1941-08-09) August 9, 1941 (age 82)AllegianceUnited States of AmericaService/branchUnited States Air ForceYears of service1964–1996RankLieutenant General Jay W. Kelley (born August 9, 1941) is an American retired Air Force lieutenant general who was commander of Air University at Maxwell Air Force Base in Montgomery, Alabama, and director of education of the Air Education and Training Command, headquartered at Randolph Air Force Base…

Institution of the State Council of the People's Republic of China You can help expand this article with text translated from the corresponding article in Chinese. (March 2023) Click [show] for important translation instructions. Machine translation, like DeepL or Google Translate, is a useful starting point for translations, but translators must revise errors as necessary and confirm that the translation is accurate, rather than simply copy-pasting machine-translated text into the English …

State forest in Virginia, United States Whitney State ForestIUCN category VI (protected area with sustainable use of natural resources)Sign at Whitney State ForestLocation within VirginiaLocationFauquier County, VirginiaNearest cityWarrentonCoordinates38°40′10″N 77°48′42.5″W / 38.66944°N 77.811806°W / 38.66944; -77.811806Area148 acres (60 ha)Established1972 (1972)Governing bodyVirginia Department of Forestry Whitney State Forest is a Virgin…

American football player (born 1995) American football player Vita VeaVea with the Buccaneers in 2021No. 50 – Tampa Bay BuccaneersPosition:Nose tacklePersonal informationBorn: (1995-02-05) February 5, 1995 (age 29)Stanford, California, U.S.Height:6 ft 4 in (1.93 m)Weight:347 lb (157 kg)Career informationHigh school:Milpitas (Milpitas, California)College:Washington (2014–2017)NFL draft:2018 / Round: 1 / Pick: 12Career history Tampa Bay Buccane…

Aquinas' arguments that there is a real God Thomas Aquinas, the 13th-century Dominican friar and theologian who formalised the Five Ways intended to demonstrate God's existence Part of a series onThomas Aquinas Thomism Scholasticism Apophatic theology Divine simplicity Quinque viae Beatific vision Actus purus Actus essendi Primum Movens Sacraments Correspondence theory Hylomorphism Substance theory (ousia) Substantial form Quiddity (essence / accident nature) Peripatetic axiom…

Roman glass cup Lycurgus CupAppearance when back-litMaterialGlass, dichroic, later gilt-silver ornament mounted to rim and footSizeHeight: 15.9 cm (6.3 in)Width: 13.2 cm (5.2 in)Weight700 g (1.5 lb)Created4th century CEPeriod/cultureLate RomanPresent locationBritish Museum, Room 41Identification1958,1202.1 When viewed in reflected light, as in this flash photograph, the cup's dichroic glass is green in colour, whereas when viewed in transmitted light, the glass appe…

English clergyman and scholar (1849–1909) Old Court of Selwyn College, Cambridge, with the Hall on the right Richard Appleton MA (17 February 1849 – 1 March 1909) was an English scholar, clergyman of the Church of England, and the fourth Master of Selwyn College, Cambridge, 1907 – 1909. He was a fellow of Trinity College, Cambridge, and a parish priest before moving to Selwyn.[1] Early life Appleton was born in Liverpool, the son of another Revd Richard Appleton and grandson, o…

American guitarist (1942–1970) Not to be confused with Jimmy Hendriks. For the film, see Jimi Hendrix (film). For the song, see Jimi Hendrix (song). Hendrix redirects here. For other uses, see Hendrix (disambiguation). Jimi HendrixHendrix performing on Hoepla in 1967Background informationBirth nameJohnny Allen HendrixAlso known asJames Marshall HendrixBorn(1942-11-27)November 27, 1942Seattle, Washington, USDiedSeptember 18, 1970(1970-09-18) (aged 27)London, EnglandGenresRockpsychedeliablu…

  هذه المقالة عن مرتضى القزويني. لمعانٍ أخرى، طالع القزويني (توضيح). آية الله السيد مرتضى القزويني معلومات شخصية الميلاد 1 أغسطس 1930 (العمر 93 سنة)كربلاء،  المملكة العراقية. الإقامة كربلاء،  العراق. مواطنة العراق  الأولاد السيد مصطفى القزويني  [لغات أخرى]‏حس…

Bjarne Stroustrup Bjarne Stroustrup (pronuncia: /bʝɑ'nø stɻɤu'stɻɵp/; Århus, 30 dicembre 1950) è un programmatore e informatico danese, noto per aver inventato il linguaggio C++. Già capo del dipartimento di ricerca sulla programmazione su larga scala dei Bell Labs di AT&T e direttore della divisione tecnologica di Morgan Stanley, dal 2022 è professore di informatica all'Università Columbia.[1] Indice 1 Biografia 1.1 Studi 1.2 Carriera 2 C++ 3 Note 4 Altri progetti 5 Coll…

This article is about the Polish football club. For the handball team, see SPR Stal Mielec. Football clubStal MielecFull nameFKS Stal MielecNickname(s)Biało-niebiescy (White-blues)Founded10 April 1939; 85 years ago (1939-04-10)GroundStadion Miejski w MielcuCapacity7,000[1]ChairmanJacek KlimekManagerKamil Kiereś[2]LeagueEkstraklasa2023–24Ekstraklasa, 11th of 18WebsiteClub website Home colours Away colours Third colours Current season FKS Stal Mielec (Polish p…

Halaman ini berisi artikel tentang merek es krim. Untuk penggunaan lain, lihat Good humor (disambiguasi). Good HumorJenis produkMerek es krimPemilikGood Humor-BreyersNegaraYoungstown, Ohio, Amerika SerikatDiluncurkan1920; 104 tahun lalu (1920)PasarAmerika Serikat, Kanada, Jerman dan BelandaPemilik sebelumnyaGood Humor Corporation of AmericaSitus webwww.goodhumor.com Good Humor adalah sebuah merek es krim milik Good Humor-Breyers yang memulai sejarahnya di Youngstown, Ohio, Amerika Serikat p…