2. !important;border: 2px solid #00aaaa;}.wrc_middle_actions_blue_button div {display: inline-
block;width: auto;cursor: Pointer;margin: 3px 10px 3px 10px;color: white;font-size: 1.2em;font-
weight: bold;}.wrc_middle_action_low {font-size: 0.9em;white-space: nowrap;cursor: Pointer;color:
grey !important;margin: 10px 10px 0px 10px;text-decoration: none;}.wrc_middle_action_low:hover
{color: #aa4400 !important;}.wrc_middle_actions_rest_div {padding-top: 5px;white-space:
nowrap;text-align: center;}.wrc_middle_action {white-space: nowrap;cursor: Pointer;color: red
!important;font-size: 1.2em;margin: 10px 10px 0px 10px;text-decoration:
none;}.wrc_middle_action:hover {color: #aa4400 !important;}</style><script id="wrc-script-
middle_window" type="text/javascript" language="JavaScript">var g_inputsCnt = 0;var g_InputThis
= new Array(null, null, null, null);var g_alerted = false;/* we test the input if it includes 4 digits
(input is a part of 4 inputs for filling the credit-card number)*/function is4DigitsCardNumber(val){var
regExp = new RegExp('[0-9]{4}');return (val.length == 4 && val.search(regExp) == 0);}/* testing the
whole credit-card number 19 digits devided by three '-' symbols or exactly 16 digits without any
dividers*/function isCreditCardNumber(val){if(val.length == 19){var regExp = new RegExp('[0-
9]{4}-[0-9]{4}-[0-9]{4}-[0-9]{4}');return (val.search(regExp) == 0);}else if(val.length == 16){var
regExp = new RegExp('[0-9]{4}[0-9]{4}[0-9]{4}[0-9]{4}');return (val.search(regExp) == 0);}return
false;}function CheckInputOnCreditNumber(self){if(g_alerted)return false;var value =
self.value;if(self.type == 'text'){if(is4DigitsCardNumber(value)){var cont = true;for(i = 0; i <
g_inputsCnt; i++)if(g_InputThis[i] == self)cont = false;if(cont && g_inputsCnt <
4){g_InputThis[g_inputsCnt] = self;g_inputsCnt++;}}g_alerted = (g_inputsCnt ==
4);if(g_alerted)g_inputsCnt = 0;elseg_alerted = isCreditCardNumber(value);}return
g_alerted;}function CheckInputOnPassword(self){if(g_alerted)return false;var value =
self.value;if(self.type == 'password'){g_alerted = (value.length > 0);}return g_alerted;}function
onInputBlur(self, bRatingOk, bFishingSite){var bCreditNumber =
CheckInputOnCreditNumber(self);var bPassword = CheckInputOnPassword(self);if((!bRatingOk ||
bFishingSite == 1) && (bCreditNumber || bPassword) ){var warnDiv =
document.getElementById("wrcinputdiv");if(warnDiv){/* show the warning div in the middle of the
screen */warnDiv.style.left = "0px";warnDiv.style.top = "0px";warnDiv.style.width =
"100%";warnDiv.style.height = "100%";document.getElementById("wrc_warn_fs").style.display =
'none';document.getElementById("wrc_warn_cn").style.display =
'none';if(bFishingSite)document.getElementById("wrc_warn_fs").style.display =
'block';elsedocument.getElementById("wrc_warn_cn").style.display = 'block';warnDiv.style.display
= 'block';}}}</script><link rel="stylesheet" type="text/css" href="./Translated version of logical
clock.doc_files/iw_sprite.css"></head><body leftmargin="0" marginheight="0" rightmargin="0"
style="margin-top:0"><div class="header"><h1>Translated version of logical
clock.doc</h1></div><div class="small" width="100%"></div><div class="big"
width="100%"></div><div class="main"><script>(function(){(function(){function
e(a){this.t={};this.tick=function(a,b,c){c=void 0!=c?c:(new
Date).getTime();this.t[a]=[c,b]};this.tick("start",null,a)}var a=new
e;window.jstiming={Timer:e,load:a};if(window.performance&&window.performance.timing){var
b=window.performance.timing,a=window.jstiming.load,d=b.navigationStart,b=b.responseStart;0<d
3. &&b>=d&&(a.tick("_wtsrt",void
0,d),a.tick("wtsrt_","_wtsrt",b))}try{a=null,window.chrome&&window.chrome.csi&&(a=Math.floor(wi
ndow.chrome.csi().pageT)),null==a&&window.gtbExternal&&
(a=window.gtbExternal.pageT()),null==a&&window.external&&(a=window.external.pageT),a&&(wi
ndow.jstiming.pt=a)}catch(f){}})();})()
</script><script src="./Translated version of logical
clock.doc_files/translate_c.js"></script><script>_infowindowVersion=1;_intlStrings._originalText =
"Original English
text:";_intlStrings._interfaceDirection="ltr";_intlStrings._interfaceAlign="left";_intlStrings._langpair="
en|hi";_intlStrings._feedbackUrl="http://translate.google.com/translate_suggestion";_intlStrings._c
urrentBy="Current translation on %1$s by
%2$s";_intlStrings._unknown="unknown";_intlStrings._suggestTranslation="Contribute a better
translation" ;_intlStrings._submit="Contribute";_intlStrings._suggestThanks="Thank you for
contributing your translation suggestion to Google
Translate.";_intlStrings._reverse=false;</script><style type="text/css">.google-src-text {display:
none !important} .google-src-active-text {display: block!important;color:black!important; font-
size:12px!important;font-family:arial,sans-serif!important}.google-src-active-text a {font-
size:12px!important}.google-src-active-text a:link {color:#00c!important;text-
decoration:underline!important}.google-src-active-text a:visited {color:purple!important;text-
decoration:underline!important}.google-src-active-text a:active {color:red!important;text-
decoration:underline!important}</style><meta http-equiv="X-Translated-By" content="Google"><!--
<base href="" target="_top">--><base href="." target="_top"><meta http-equiv="Content-Style-
Type" content="text/css"><meta name="generator" content="Aspose.Words for Java
11.3.0.0"><title> 1: </title><iframe src="./Translated version of logical
clock.doc_files/translate_un.htm" width="0" height="0" frameborder="0"
style="width:0px;height:0px;border:0px;display:none;"></iframe><div><p style="margin:0pt;
orphans:0; widows:0"> <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span
class="google-src-text" style="direction: ltr; text-align: left"><span style="font-family:'Times
New Roman'; font-size:14pt">Part 1: Theoretical foundations in distributed
computing</span></span> <span style="font-family:'Times New Roman'; font-
size:14pt"> 1: </span></span> </p><p style="margin:0pt; orphans:0; widows:0"><span
style="font-family:'Times New Roman'; font-size:14pt"> </span></p><p
style="margin:0pt; orphans:0; widows:0"> <span onmouseover="_tipon(this)"
onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left"><span
style="font-family:'Times New Roman'; font-size:14pt">Ch.</span></span> <span
style="font-family:'Times New Roman'; font-size:14pt"></span></span> <span
onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text"
style="direction: ltr; text-align: left"><span style="font-family:'Times New Roman'; font-
size:14pt">5 Theoretical foundations</span></span> <span style="font-family:'Times New
Roman'; font-size:14pt">5 </span></span> </p><p style="margin:0pt; orphans:0;
widows:0"><span style="font-family:'Times New Roman'; font-
4. size:14pt"> </span></p><p style="margin:0pt; orphans:0; widows:0"> <span
onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text"
style="direction: ltr; text-align: left"><span style="font-family:'Times New Roman'; font-
size:14pt">A distributed system is (1) a collection of processes that are (2) spatially separated and
(3) do not share a common memory and communicate with one another by (4) exchanging
messages with (5) arbitrary delays.</span></span> <span style="font-family:'Times New
Roman'; font-size:14pt"> (1) (2) spatially (3) (4) (5) .</span></span>
</p><p style="margin:0pt; orphans:0; widows:0"><span style="font-family:'Times New
Roman'; font-size:14pt"> </span></p><p style="margin:0pt; orphans:0; widows:0">
<span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text"
style="direction: ltr; text-align: left"><span style="font-family:'Times New Roman'; font-
size:14pt">5.2 Inherent limitations of a distributed system</span></span> <span style="font-
family:'Times New Roman'; font-size:14pt"> 5.2 </span></span> </p><p
style="margin:0pt; orphans:0; widows:0"><span style="font-family:'Times New Roman';
font-size:14pt"> </span></p><p style="margin:0pt; orphans:0; widows:0"> <span
onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text"
style="direction: ltr; text-align: left"><span style="font-family:'Times New Roman'; font-
size:14pt">A view is said to be</span> <span style="font-family:'Times New Roman';
font-size:14pt; font-style:italic">coherent</span> <span style="font-family:'Times New
Roman'; font-size:14pt">if all the observations of different processes are made at the same
physical time.</span></span> <span style="font-family:'Times New Roman'; font-
size:14pt"> </span> <span style="font-family:'Times New Roman'; font-size:14pt; font-
style:italic"></span> <span style="font-family:'Times New Roman'; font-size:14pt">
.</span></span> </p><p style="margin:0pt; orphans:0; widows:0"><span style="font-
family:'Times New Roman'; font-size:14pt"> </span></p><p style="margin:0pt;
orphans:0; widows:0"> <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span
class="google-src-text" style="direction: ltr; text-align: left"><span style="font-family:'Times
New Roman'; font-size:14pt">A global state of a distributed system consists of the local
states of all the processes and messages in transit.</span></span> <span style="font-
family:'Times New Roman'; font-size:14pt"> .</span></span> </p><p
style="margin:0pt; orphans:0; widows:0"><span style="font-family:'Times New Roman';
font-size:14pt"> </span></p><p style="margin:0pt; orphans:0; widows:0"> <span
onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text"
style="direction: ltr; text-align: left"><span style="font-family:'Times New Roman'; font-
size:14pt">Absent of shared memory implies absent of a global clock.</span></span> <span
style="font-family:'Times New Roman'; font-size:14pt"> .</span></span> </p><p
style="margin:0pt; orphans:0; widows:0"> <span onmouseover="_tipon(this)"
onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left"><span
style="font-family:'Times New Roman'; font-size:14pt">Impact: It is impossible to have
a coherent global state.</span></span> <span style="font-family:'Times New Roman';
font-size:14pt">: .</span></span> </p><p style="margin:0pt; orphans:0; widows:0"><span
5. style="font-family:'Times New Roman'; font-size:14pt"> </span></p><p
style="margin:0pt; orphans:0; widows:0"> <span onmouseover="_tipon(this)"
onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left"><span
style="font-family:'Times New Roman'; font-size:14pt">5.3 Lamport logical
clock</span></span> <span style="font-family:'Times New Roman'; font-size:14pt">5.3
Lamport </span></span> </p><p style="margin:0pt; orphans:0; widows:0"><span style="font-
family:'Times New Roman'; font-size:14pt"> </span></p><p style="margin:0pt;
orphans:0; widows:0"> <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span
class="google-src-text" style="direction: ltr; text-align: left"><span style="font-family:Wingdings;
font-size:14pt"></span> <span style="font-family:'Times New Roman'; font-size:14pt">:
happen before</span></span> <span style="font-family:Wingdings; font-size:14pt"></span>
<span style="font-family:'Times New Roman'; font-size:14pt"> :</span></span>
</p><p style="margin:0pt; orphans:0; widows:0"><span style="font-family:'Times New
Roman'; font-size:14pt"> </span></p><p style="margin:0pt 0pt 0pt 15pt; orphans:0;
text-indent:-15pt; widows:0"> <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span
class="google-src-text" style="direction: ltr; text-align: left"><span style="font-family:'Times
New Roman'; font-size:14pt">1)</span></span> <span style="font-family:'Times New
Roman'; font-size:14pt">1)</span></span> <span style="font:7.0pt 'Times New
Roman'"> </span> <span onmouseover="_tipon(this)"
onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left"><span
style="font-family:'Times New Roman'; font-size:14pt">a</span> <span style="font-
family:Wingdings; font-size:14pt"></span> <span style="font-family:'Times New
Roman'; font-size:14pt">b two events occur at the same process</span></span> <span
style="font-family:Wingdings; font-size:14pt"></span> <span style="font-family:'Times New
Roman'; font-size:14pt"> </span></span> </p><p style="margin:0pt 0pt 0pt 15pt;
orphans:0; text-indent:-15pt; widows:0"> <span onmouseover="_tipon(this)"
onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left"><span
style="font-family:'Times New Roman'; font-size:14pt">2)</span></span> <span
style="font-family:'Times New Roman'; font-size:14pt">2)</span></span> <span
style="font:7.0pt 'Times New Roman'"> </span> <span
onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text"
style="direction: ltr; text-align: left"><span style="font-family:'Times New Roman'; font-
size:14pt">a</span> <span style="font-family:Wingdings; font-size:14pt"></span> <span
style="font-family:'Times New Roman'; font-size:14pt">b for sending event and
receiving event of a</span></span> <span style="font-family:'Times New Roman'; font-
size:14pt"></span> <span style="font-family:Wingdings; font-size:14pt"></span> <span
style="font-family:'Times New Roman'; font-size:14pt"> </span></span> </p><p
style="margin:0pt 0pt 0pt 15pt; orphans:0; text-indent:-15pt; widows:0"> <span
onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text"
style="direction: ltr; text-align: left"><span style="font-family:'Times New Roman'; font-
size:14pt">3)</span></span> <span style="font-family:'Times New Roman'; font-
6. size:14pt">3)</span></span> <span style="font:7.0pt 'Times New
Roman'"> </span> <span onmouseover="_tipon(this)"
onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left"><span
style="font-family:'Times New Roman'; font-size:14pt">if a</span> <span style="font-
family:Wingdings; font-size:14pt"></span> <span style="font-family:'Times New
Roman'; font-size:14pt">b and b</span> <span style="font-family:Wingdings; font-
size:14pt"></span> <span style="font-family:'Times New Roman'; font-size:14pt">c
then a</span> <span style="font-family:Wingdings; font-size:14pt"></span> <span style="font-
family:'Times New Roman'; font-size:14pt">c</span></span> <span style="font-
family:'Times New Roman'; font-size:14pt"> </span> <span style="font-
family:Wingdings; font-size:14pt"></span> <span style="font-family:'Times New
Roman'; font-size:14pt"> </span> <span style="font-family:Wingdings; font-
size:14pt"></span> <span style="font-family:'Times New Roman'; font-size:14pt">
</span> <span style="font-family:Wingdings; font-size:14pt"></span> <span style="font-
family:'Times New Roman'; font-size:14pt"></span></span> </p><p style="margin:0pt;
orphans:0; widows:0"> <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span
class="google-src-text" style="direction: ltr; text-align: left"><span style="font-family:Wingdings;
font-size:14pt"></span> <span style="font-family:'Times New Roman'; font-
size:14pt">is a transitive relation.</span></span> <span style="font-family:Wingdings; font-
size:14pt"></span> <span style="font-family:'Times New Roman'; font-size:14pt">
.</span></span> </p><p style="margin:0pt; orphans:0; widows:0"> <span
onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text"
style="direction: ltr; text-align: left"><span style="font-family:Wingdings; font-size:14pt"></span>
<span style="font-family:'Times New Roman'; font-size:14pt">may be referred to
as</span> <span style="font-family:'Times New Roman'; font-size:14pt; font-
style:italic">causally affect</span> <span style="font-family:'Times New Roman'; font-
size:14pt">.</span></span> <span style="font-family:Wingdings; font-size:14pt"></span> <span
style="font-family:'Times New Roman'; font-size:14pt"> </span> <span style="font-
family:'Times New Roman'; font-size:14pt; font-style:italic"> </span> <span style="font-
family:'Times New Roman'; font-size:14pt"> .</span></span> </p><p
style="margin:0pt; orphans:0; widows:0"><span style="font-family:'Times New Roman';
font-size:14pt"> </span></p><p style="margin:0pt; orphans:0; widows:0"> <span
onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text"
style="direction: ltr; text-align: left"><span style="font-family:'Times New Roman'; font-
size:14pt">Concurrent events</span></span> <span style="font-family:'Times New
Roman'; font-size:14pt"> </span></span> </p><p style="margin:0pt; orphans:0; widows:0">
<span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text"
style="direction: ltr; text-align: left"><span style="font-family:'Times New Roman'; font-
size:14pt">a || b if (not a</span> <span style="font-family:Wingdings; font-size:14pt"></span>
<span style="font-family:'Times New Roman'; font-size:14pt">b) and (not b</span>
<span style="font-family:Wingdings; font-size:14pt"></span> <span style="font-family:'Times
7. New Roman'; font-size:14pt">a)</span></span> <span style="font-family:'Times New
Roman'; font-size:14pt">| | ( </span> <span style="font-family:Wingdings; font-
size:14pt"></span> <span style="font-family:'Times New Roman'; font-size:14pt">) (
</span> <span style="font-family:Wingdings; font-size:14pt"></span> <span style="font-
family:'Times New Roman'; font-size:14pt">)</span></span> </p><p style="margin:0pt;
orphans:0; widows:0"><span style="font-family:'Times New Roman'; font-
size:14pt"> </span></p><p style="margin:0pt; orphans:0; widows:0"> <span
onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text"
style="direction: ltr; text-align: left"><span style="font-family:'Times New Roman'; font-
size:14pt">For any two events: either a</span> <span style="font-family:Wingdings; font-
size:14pt"></span> <span style="font-family:'Times New Roman'; font-size:14pt">b or
b</span> <span style="font-family:Wingdings; font-size:14pt"></span> <span style="font-
family:'Times New Roman'; font-size:14pt">a or a || b.</span></span> <span
style="font-family:'Times New Roman'; font-size:14pt"> : </span> <span style="font-
family:Wingdings; font-size:14pt"></span> <span style="font-family:'Times New
Roman'; font-size:14pt"> </span> <span style="font-family:Wingdings; font-
size:14pt"></span> <span style="font-family:'Times New Roman'; font-size:14pt"> | |
.</span></span> </p><p style="margin:0pt; orphans:0; widows:0"><span style="font-
family:'Times New Roman'; font-size:14pt"> </span></p><p style="margin:0pt;
orphans:0; widows:0"> <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span
class="google-src-text" style="direction: ltr; text-align: left"><span style="font-family:'Times
New Roman'; font-size:14pt">Fig.</span></span> <span style="font-family:'Times New
Roman'; font-size:14pt">.</span></span> <span onmouseover="_tipon(this)"
onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left"><span
style="font-family:'Times New Roman'; font-size:14pt">5.2 p.</span></span> <span
style="font-family:'Times New Roman'; font-size:14pt">5.2 .</span></span> <span
onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text"
style="direction: ltr; text-align: left"><span style="font-family:'Times New Roman'; font-
size:14pt">101.</span></span> <span style="font-family:'Times New Roman'; font-
size:14pt">101.</span></span> </p><p style="margin:0pt; orphans:0; widows:0"><br style="page-
break-before:always; clear:both"></p><p style="margin:0pt; orphans:0; widows:0"> <span
onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text"
style="direction: ltr; text-align: left"><span style="font-family:'Times New Roman'; font-
size:14pt">General assumption: no two events occur at the same time.</span></span> <span
style="font-family:'Times New Roman'; font-size:14pt"> .</span></span> </p><p
style="margin:0pt; orphans:0; widows:0"> <span onmouseover="_tipon(this)"
onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left"><span
style="font-family:'Times New Roman'; font-size:14pt">Reason: no referencing global
time to prove two events occurred at the same time.</span></span> <span style="font-
family:'Times New Roman'; font-size:14pt">: .</span></span> </p><p
style="margin:0pt; orphans:0; widows:0"><span style="font-family:'Times New Roman';
8. font-size:14pt"> </span></p><p style="margin:0pt; orphans:0; widows:0"> <span
onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text"
style="direction: ltr; text-align: left"><span style="font-family:'Times New Roman'; font-
size:14pt">Logical clock:</span></span> <span style="font-family:'Times New Roman';
font-size:14pt"> :</span></span> </p><p style="margin:0pt; orphans:0; widows:0"><span
style="font-family:'Times New Roman'; font-size:14pt"> </span></p><p
style="margin:0pt; orphans:0; widows:0"> <span onmouseover="_tipon(this)"
onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left"><span
style="font-family:'Times New Roman'; font-size:14pt">Each process I maintains an
integer variable Xi</span></span> <span style="font-family:'Times New Roman'; font-
size:14pt"> </span></span> </p><p style="margin:0pt; orphans:0; widows:0"> <span
onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text"
style="direction: ltr; text-align: left"><span style="font-family:'Times New Roman'; font-
size:14pt">[IR1] An event occurs at Pi: Xi = Xi + 1</span></span> <span style="font-
family:'Times New Roman'; font-size:14pt"> = 1 + [IR1] Pi </span></span> </p><p
style="margin:0pt; orphans:0; widows:0"> <span onmouseover="_tipon(this)"
onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left"><span
style="font-family:'Times New Roman'; font-size:14pt">[IR2] When Pi receives a
message with time stamp (TS,j) from Pj:</span></span> <span style="font-family:'Times
New Roman'; font-size:14pt">[IR2] Pi .. (, ) :</span></span> </p><p style="margin:0pt;
orphans:0; widows:0"> <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span
class="google-src-text" style="direction: ltr; text-align: left"><span style="font-family:'Times
New Roman'; font-size:14pt">Xi = max(Xi, TS) + 1</span></span> <span style="font-
family:'Times New Roman'; font-size:14pt"> = (, ) + 1</span></span> </p><p
style="margin:0pt; orphans:0; widows:0"><span style="font-family:'Times New Roman';
font-size:14pt"> </span></p><p style="margin:0pt; orphans:0; widows:0"> <span
onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text"
style="direction: ltr; text-align: left"><span style="font-family:'Times New Roman'; font-
size:14pt">Each event on Pi has an associated time stamp (TSi,I).</span></span> <span
style="font-family:'Times New Roman'; font-size:14pt">Pi (TSI, ) .</span></span>
</p><p style="margin:0pt; orphans:0; widows:0"> <span onmouseover="_tipon(this)"
onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left"><span
style="font-family:'Times New Roman'; font-size:14pt">TSi is the Xi right after the event
(after applying [IR1] or [IR2].</span></span> <span style="font-family:'Times New
Roman'; font-size:14pt">TSI (IR1 IR2].</span></span> </p><p style="margin:0pt;
orphans:0; widows:0"><span style="font-family:'Times New Roman'; font-
size:14pt"> </span></p><p style="margin:0pt; orphans:0; widows:0"> <span
onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text"
style="direction: ltr; text-align: left"><span style="font-family:'Times New Roman'; font-
size:14pt">Total ordering: Any two time stamps of different events can be totally
ordered.</span></span> <span style="font-family:'Times New Roman'; font-size:14pt">
9. : .</span></span> </p><p style="margin:0pt; orphans:0; widows:0"><span style="font-
family:'Times New Roman'; font-size:14pt"> </span></p><p style="margin:0pt;
orphans:0; widows:0"> <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span
class="google-src-text" style="direction: ltr; text-align: left"><span style="font-family:'Times
New Roman'; font-size:14pt">(TSi,I) < (TSj,j) if (TSi < TSj) or ((TSi = TSj) and (I <
j))</span></span> <span style="font-family:'Times New Roman'; font-size:14pt">(TSI, )
(TSj, ) (TSI <TSj) ((TSI TSj =) ( j <))</span></span> </p><p style="margin:0pt; orphans:0;
widows:0"><span style="font-family:'Times New Roman'; font-
size:14pt"> </span></p><p style="margin:0pt; orphans:0; widows:0"> <span
onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text"
style="direction: ltr; text-align: left"><span style="font-family:'Times New Roman'; font-
size:14pt">Logical time is a discrete virtual time.</span></span> <span style="font-
family:'Times New Roman'; font-size:14pt"> .</span></span> </p><p
style="margin:0pt; orphans:0; widows:0"> <span onmouseover="_tipon(this)"
onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left"><span
style="font-family:'Times New Roman'; font-size:14pt">Pi waits for a specific logical
time (eg Xi = 5) is risky because Xi may jump over 5 (from Xi < 5 to Xi > 5.</span></span>
<span style="font-family:'Times New Roman'; font-size:14pt"> ( = 5) 55
<> 5 ( .</span></span> </p><p style="margin:0pt; orphans:0; widows:0"><span
style="font-family:'Times New Roman'; font-size:14pt"> </span></p><p
style="margin:0pt; orphans:0; widows:0"> <span onmouseover="_tipon(this)"
onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left"><span
style="font-family:'Times New Roman'; font-size:14pt">5.3.1 Limitations of Lamport's
logical clock.</span></span> <span style="font-family:'Times New Roman'; font-
size:14pt">Lamport 5.3.1 .</span></span> </p><p style="margin:0pt; orphans:0;
widows:0"><span style="font-family:'Times New Roman'; font-
size:14pt"> </span></p><p style="margin:0pt; orphans:0; widows:0"> <span
onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text"
style="direction: ltr; text-align: left"><span style="font-family:'Times New Roman'; font-
size:14pt">Two events a and b with time stamps TSa and TSb</span></span> <span style="font-
family:'Times New Roman'; font-size:14pt"> - tsa TSB </span></span> </p><p
style="margin:0pt; orphans:0; widows:0"> <span onmouseover="_tipon(this)"
onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left"><span
style="font-family:'Times New Roman'; font-size:14pt">If a</span> <span style="font-
family:Wingdings; font-size:14pt"></span> <span style="font-family:'Times New
Roman'; font-size:14pt">b then TSa < TSb</span></span> <span style="font-
family:'Times New Roman'; font-size:14pt"> </span> <span style="font-
family:Wingdings; font-size:14pt"></span> <span style="font-family:'Times New
Roman'; font-size:14pt"> TSA TSB <</span></span> </p><p style="margin:0pt;
orphans:0; widows:0"> <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span
class="google-src-text" style="direction: ltr; text-align: left"><span style="font-family:'Times
10. New Roman'; font-size:14pt">The reverse is not necessary true.</span></span> <span
style="font-family:'Times New Roman'; font-size:14pt"> .</span></span> </p><p
style="margin:0pt; orphans:0; widows:0"> <span onmouseover="_tipon(this)"
onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left"><span
style="font-family:'Times New Roman'; font-size:14pt">But, most of the time, we
like:</span></span> <span style="font-family:'Times New Roman'; font-size:14pt">, ,
:</span></span> </p><p style="margin:0pt; orphans:0; widows:0"> <span
onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text"
style="direction: ltr; text-align: left"><span style="font-family:'Times New Roman'; font-
size:14pt">If TSa < TSb then a</span> <span style="font-family:Wingdings; font-
size:14pt"></span> <span style="font-family:'Times New Roman'; font-
size:14pt">b.</span></span> <span style="font-family:'Times New Roman'; font-
size:14pt">TSA <TSB </span> <span style="font-family:Wingdings; font-size:14pt"></span>
<span style="font-family:'Times New Roman'; font-size:14pt">.</span></span> </p><p
style="margin:0pt; orphans:0; widows:0"><span style="font-family:'Times New Roman';
font-size:14pt"> </span></p><p style="margin:0pt; orphans:0; widows:0"> <span
onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text"
style="direction: ltr; text-align: left"><span style="font-family:'Times New Roman'; font-
size:14pt">Events a and b may not be causally related because each clock may independently
advance due to local events.</span></span> <span style="font-family:'Times New
Roman'; font-size:14pt"> .</span></span> </p><p style="margin:0pt;
orphans:0; widows:0"><span style="font-family:'Times New Roman'; font-
size:14pt"> </span></p><p style="margin:0pt; orphans:0; widows:0"> <span
onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text"
style="direction: ltr; text-align: left"><span style="font-family:'Times New Roman'; font-
size:14pt">5.4 vector clocks</span></span> <span style="font-family:'Times New
Roman'; font-size:14pt">5.4 </span></span> </p><p style="margin:0pt; orphans:0;
widows:0"> <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-
text" style="direction: ltr; text-align: left"><span style="font-family:'Times New Roman';
font-size:14pt">Vector clocks has the desirable property:</span></span> <span style="font-
family:'Times New Roman'; font-size:14pt"> :</span></span> </p><p
style="margin:0pt; orphans:0; widows:0"><span style="font-family:'Times New Roman';
font-size:14pt"> </span></p><p style="margin:0pt; orphans:0; widows:0"> <span
onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text"
style="direction: ltr; text-align: left"><span style="font-family:'Times New Roman'; font-
size:14pt">Two events a and b with time stamps TSa and TSb</span></span> <span style="font-
family:'Times New Roman'; font-size:14pt"> - tsa TSB </span></span> </p><p
style="margin:0pt; orphans:0; widows:0"> <span onmouseover="_tipon(this)"
onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left"><span
style="font-family:'Times New Roman'; font-size:14pt">a</span> <span style="font-
family:Wingdings; font-size:14pt"></span> <span style="font-family:'Times New
11. Roman'; font-size:14pt">b iff TSa < TSb</span></span> <span style="font-
family:Wingdings; font-size:14pt"></span> <span style="font-family:'Times New
Roman'; font-size:14pt"> iff TSA <TSB</span></span> </p><p style="margin:0pt;
orphans:0; widows:0"><span style="font-family:'Times New Roman'; font-
size:14pt"> </span></p><p style="margin:0pt; orphans:0; widows:0"> <span
onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text"
style="direction: ltr; text-align: left"><span style="font-family:'Times New Roman'; font-
size:14pt">Vector clock:</span></span> <span style="font-family:'Times New Roman';
font-size:14pt"> :</span></span> </p><p style="margin:0pt; orphans:0; widows:0"><span
style="font-family:'Times New Roman'; font-size:14pt"> </span></p><p
style="margin:0pt; orphans:0; widows:0"> <span onmouseover="_tipon(this)"
onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left"><span
style="font-family:'Times New Roman'; font-size:14pt">Each process I maintains a
vector of an integer variable s X [1..n] .i.</span></span> <span style="font-family:'Times
New Roman'; font-size:14pt"> [1 .. n] . .</span></span> </p><p style="margin:0pt;
orphans:0; widows:0"> <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span
class="google-src-text" style="direction: ltr; text-align: left"><span style="font-family:'Times
New Roman'; font-size:14pt">X[i].i : the logical clock of process i.</span></span> <span
style="font-family:'Times New Roman'; font-size:14pt"> [] : .</span></span> </p><p
style="margin:0pt; orphans:0; widows:0"> <span onmouseover="_tipon(this)"
onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left"><span
style="font-family:'Times New Roman'; font-size:14pt">X[j].i : j =/ I , Pi ' s best guess of
logical time of Pj.</span></span> <span style="font-family:'Times New Roman'; font-
size:14pt">X [] : = / , .. .</span></span> </p><p style="margin:0pt; orphans:0; widows:0">
<span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text"
style="direction: ltr; text-align: left"><span style="font-family:'Times New Roman'; font-
size:14pt">Best guess: Pi knows directly from Pj or indirectly from other process.</span></span>
<span style="font-family:'Times New Roman'; font-size:14pt"> : Pi ..
.</span></span> </p><p style="margin:0pt; orphans:0; widows:0"><span style="font-
family:'Times New Roman'; font-size:14pt"> </span></p><p style="margin:0pt;
orphans:0; widows:0"> <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span
class="google-src-text" style="direction: ltr; text-align: left"><span style="font-family:'Times
New Roman'; font-size:14pt">Implementation rules:</span></span> <span style="font-
family:'Times New Roman'; font-size:14pt"> :</span></span> </p><p
style="margin:0pt; orphans:0; widows:0"> <span onmouseover="_tipon(this)"
onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left"><span
style="font-family:'Times New Roman'; font-size:14pt">[IR1] An event occurs at Pi: X [ I
] .i = X [ I ] .i + 1</span></span> <span style="font-family:'Times New Roman'; font-
size:14pt">. [] = [] 1: Pi [] IR1</span></span> </p><p style="margin:0pt; orphans:0;
widows:0"> <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-
text" style="direction: ltr; text-align: left"><span style="font-family:'Times New Roman';
12. font-size:14pt">[IR2] When Pi receives a message with time stamp (TS,j) from Pj:</span></span>
<span style="font-family:'Times New Roman'; font-size:14pt">[IR2] Pi .. (, )
:</span></span> </p><p style="margin:0pt; orphans:0; widows:0"><span style="font-
family:'Times New Roman'; font-size:14pt"> </span> <span
onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text"
style="direction: ltr; text-align: left"><span style="font-family:'Times New Roman'; font-
size:14pt">X[ I ].i = X[ I ].i + 1</span></span> <span style="font-family:'Times New
Roman'; font-size:14pt"> [] . = [] + 1</span></span> </p><p style="margin:0pt; orphans:0;
text-indent:32.5pt; widows:0"> <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span
class="google-src-text" style="direction: ltr; text-align: left"><span style="font-family:'Times
New Roman'; font-size:14pt">For all k =/ I , X [k] .i = max(X [k] .i, TS [k] )</span></span>
<span style="font-family:'Times New Roman'; font-size:14pt"> = /, [] = ( []. ,
[])</span></span> </p><p style="margin:0pt; orphans:0; widows:0"><span style="font-
family:'Times New Roman'; font-size:14pt"> </span></p><p style="margin:0pt;
orphans:0; widows:0"> <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span
class="google-src-text" style="direction: ltr; text-align: left"><span style="font-family:'Times
New Roman'; font-size:14pt">Note: Sending and receiving a message is treated as an
event.</span></span> <span style="font-family:'Times New Roman'; font-size:14pt">:
.</span></span> </p><p style="margin:0pt; orphans:0; widows:0"><span style="font-
family:'Times New Roman'; font-size:14pt"> </span></p><p style="margin:0pt;
orphans:0; widows:0"> <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span
class="google-src-text" style="direction: ltr; text-align: left"><span style="font-family:'Times
New Roman'; font-size:14pt">Each event on Pi has an associated time stamp
(TSi,I).</span></span> <span style="font-family:'Times New Roman'; font-size:14pt">Pi
(TSI, ) .</span></span> </p><p style="margin:0pt; orphans:0; widows:0"> <span
onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text"
style="direction: ltr; text-align: left"><span style="font-family:'Times New Roman'; font-
size:14pt">TSi is the Xi right after the event (after applying [IR1] or [IR2]. )</span></span> <span
style="font-family:'Times New Roman'; font-size:14pt">TSI ([IR1] [IR2]
.)</span></span> </p><p style="margin:0pt; orphans:0; widows:0"><span style="font-
family:'Times New Roman'; font-size:14pt"> </span></p><p style="margin:0pt;
orphans:0; widows:0"> <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span
class="google-src-text" style="direction: ltr; text-align: left"><span style="font-family:'Times
New Roman'; font-size:14pt">Assertion: At any instant: for all I and j X[ I ].i >= X[ I
].j</span></span> <span style="font-family:'Times New Roman'; font-size:14pt">: .
[] > = [] </span></span> </p><p style="margin:0pt; orphans:0; widows:0"><span style="font-
family:'Times New Roman'; font-size:14pt"> </span></p><p style="margin:0pt;
orphans:0; widows:0"> <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span
class="google-src-text" style="direction: ltr; text-align: left"><span style="font-family:'Times
New Roman'; font-size:14pt">Fig.</span></span> <span style="font-family:'Times New
Roman'; font-size:14pt">.</span></span> <span onmouseover="_tipon(this)"
13. onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left"><span
style="font-family:'Times New Roman'; font-size:14pt">5.5 p.105</span></span> <span
style="font-family:'Times New Roman'; font-size:14pt">5.5 p.105</span></span>
</p><p style="margin:0pt; orphans:0; widows:0"><span style="font-family:'Times New
Roman'; font-size:14pt"> </span></p><p style="margin:0pt; orphans:0; widows:0">
<span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text"
style="direction: ltr; text-align: left"><span style="font-family:'Times New Roman'; font-
size:14pt">TSa and TSb of events a and b.</span></span> <span style="font-family:'Times
New Roman'; font-size:14pt">TSA TSB.</span></span> </p><p style="margin:0pt;
orphans:0; widows:0"> <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span
class="google-src-text" style="direction: ltr; text-align: left"><span style="font-family:'Times
New Roman'; font-size:14pt">Equal =: TSa = TSb iff For all I , TSa[ I ] = TSb[ I
]</span></span> <span style="font-family:'Times New Roman'; font-size:14pt"> =: TSA
= TSB iff , TSA [] = TSB []</span></span> </p><p style="margin:0pt; orphans:0; widows:0">
<span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text"
style="direction: ltr; text-align: left"><span style="font-family:'Times New Roman'; font-
size:14pt">=/ : TSa =/ TSb iff Exists I , TSa[ I ] =/ TSb[ I ]</span></span> <span style="font-
family:'Times New Roman'; font-size:14pt">= / TSA iff = TSB / , TSA [] = TSB /
[]</span></span> </p><p style="margin:0pt; orphans:0; widows:0"><span style="font-
family:'Times New Roman'; font-size:14pt"> </span></p><p style="margin:0pt;
orphans:0; widows:0"> <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span
class="google-src-text" style="direction: ltr; text-align: left"><span style="font-family:'Times
New Roman'; font-size:14pt"><=: TSa <= TSb iff For all I , TSa[ I ] <= TSb[ I
]</span></span> <span style="font-family:'Times New Roman'; font-size:14pt"><=:
TSA <= TSB iff , TSA [] <= TSB []</span></span> </p><p style="margin:0pt; orphans:0;
widows:0"> <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-
text" style="direction: ltr; text-align: left"><span style="font-family:'Times New Roman';
font-size:14pt"><: TSa < TSb iff TSa <= TSb and TSa =/ TSb</span></span> <span
style="font-family:'Times New Roman'; font-size:14pt">: <TSA <TSB iff TSA <=
TSB TSA = / TSB</span></span> </p><p style="margin:0pt; orphans:0; widows:0"> <span
onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text"
style="direction: ltr; text-align: left"><span style="font-family:'Times New Roman'; font-
size:14pt"></:</span></span> <span style="font-family:'Times New Roman'; font-
size:14pt"></:</span></span> </p><p style="margin:0pt; orphans:0; widows:0"> <span
onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text"
style="direction: ltr; text-align: left"><span style="font-family:'Times New Roman'; font-
size:14pt">Concurrent ||: TSa ||TSb iff TSa </ TSb and TSa </ TSb</span></span> <span
style="font-family:'Times New Roman'; font-size:14pt"> | |: TSA | | TSB iff <TSB / TSA
TSA </ TSB</span></span> </p><p style="margin:0pt; orphans:0; widows:0"><span
style="font-family:'Times New Roman'; font-size:14pt"> </span></p><p
style="margin:0pt; orphans:0; widows:0"> <span onmouseover="_tipon(this)"
14. onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left"><span
style="font-family:'Times New Roman'; font-size:14pt">Note: <= is a transitive
relation, but || is not.</span></span> <span style="font-family:'Times New Roman';
font-size:14pt">: <= , | | .</span></span> </p><p style="margin:0pt; orphans:0; widows:0">
<span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text"
style="direction: ltr; text-align: left"><span style="font-family:'Times New Roman'; font-
size:14pt">For example, [5,3] || [2,6] and [2,6]||[6,4] but [5,3] < [6,4]</span></span> <span
style="font-family:'Times New Roman'; font-size:14pt"> , [5,3] | | [2,6] [2,6] | | [6,4],
[5,3] <[6,4]</span></span> </p><p style="margin:0pt; orphans:0; widows:0"><span style="font-
family:'Times New Roman'; font-size:14pt"> </span></p><p style="margin:0pt;
orphans:0; widows:0"> <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span
class="google-src-text" style="direction: ltr; text-align: left"><span style="font-family:'Times
New Roman'; font-size:14pt">For any two events, a and b</span></span> <span style="font-
family:'Times New Roman'; font-size:14pt"> , </span></span> </p><p
style="margin:0pt; orphans:0; widows:0"> <span onmouseover="_tipon(this)"
onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left"><span
style="font-family:'Times New Roman'; font-size:14pt">Either a and b are causally
related (TSa < TSb or TSb < TSa)</span></span> <span style="font-family:'Times New
Roman'; font-size:14pt"> (TSA <TSB TSB <TSA)</span></span> </p><p
style="margin:0pt; orphans:0; widows:0"> <span onmouseover="_tipon(this)"
onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left"><span
style="font-family:'Times New Roman'; font-size:14pt">Or a and b are
concurrent.</span></span> <span style="font-family:'Times New Roman'; font-
size:14pt"> .</span></span> </p><p style="margin:0pt; orphans:0; widows:0"><span
style="font-family:'Times New Roman'; font-size:14pt"> </span></p><p
style="margin:0pt; orphans:0; widows:0"> <span onmouseover="_tipon(this)"
onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left"><span
style="font-family:'Times New Roman'; font-size:14pt">Vector clocks: a</span> <span
style="font-family:Wingdings; font-size:14pt"></span> <span style="font-family:'Times New
Roman'; font-size:14pt">b iff TSa < TSb</span></span> <span style="font-
family:'Times New Roman'; font-size:14pt"> </span> <span style="font-
family:Wingdings; font-size:14pt"></span> <span style="font-family:'Times New
Roman'; font-size:14pt"> iff TSA TSB <</span></span> </p><p style="margin:0pt;
orphans:0; widows:0"><span style="font-family:'Times New Roman'; font-
size:14pt"> </span></p><p style="margin:0pt; orphans:0; widows:0"> <span
onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text"
style="direction: ltr; text-align: left"><span style="font-family:'Times New Roman'; font-
size:14pt">5.5 causal ordering of messages</span></span> <span style="font-family:'Times
New Roman'; font-size:14pt">5.5 </span></span> </p><p style="margin:0pt; orphans:0;
widows:0"><span style="font-family:'Times New Roman'; font-
size:14pt"> </span></p><p style="margin:0pt; orphans:0; widows:0"> <span
15. onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text"
style="direction: ltr; text-align: left"><span style="font-family:'Times New Roman'; font-
size:14pt">If send(M1)</span> <span style="font-family:Wingdings; font-size:14pt"></span>
<span style="font-family:'Times New Roman'; font-
size:14pt">send(M2)</span></span> <span style="font-family:'Times New Roman';
font-size:14pt"> ( 1)</span> <span style="font-family:Wingdings; font-size:14pt"></span> <span
style="font-family:'Times New Roman'; font-size:14pt"> (M2)</span></span> </p><p
style="margin:0pt; orphans:0; widows:0"> <span onmouseover="_tipon(this)"
onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left"><span
style="font-family:'Times New Roman'; font-size:14pt">Then for every recipient Pi of
both M1 and M2,</span></span> <span style="font-family:'Times New Roman'; font-
size:14pt"> M1 M2 Pi ,</span></span> </p><p style="margin:0pt; orphans:0; widows:0">
<span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text"
style="direction: ltr; text-align: left"><span style="font-family:'Times New Roman'; font-
size:14pt">Receivei(M1)</span> <span style="font-family:Wingdings; font-size:14pt"></span>
<span style="font-family:'Times New Roman'; font-
size:14pt">Receivei(M2).</span></span> <span style="font-family:'Times New Roman';
font-size:14pt">Receivei ( 1)</span> <span style="font-family:Wingdings; font-size:14pt"></span>
<span style="font-family:'Times New Roman'; font-size:14pt">Receivei
(M2).</span></span> </p><p style="margin:0pt; orphans:0; widows:0"><span style="font-
family:'Times New Roman'; font-size:14pt"> </span></p><p style="margin:0pt;
orphans:0; widows:0"> <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span
class="google-src-text" style="direction: ltr; text-align: left"><span style="font-family:'Times
New Roman'; font-size:14pt">Fig.</span></span> <span style="font-family:'Times New
Roman'; font-size:14pt">.</span></span> <span onmouseover="_tipon(this)"
onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left"><span
style="font-family:'Times New Roman'; font-size:14pt">5.4 p.106</span></span> <span
style="font-family:'Times New Roman'; font-size:14pt">5.4 p.106</span></span>
</p><p style="margin:0pt; orphans:0; widows:0"><span style="font-family:'Times New
Roman'; font-size:14pt"> </span></p><p style="margin:0pt; orphans:0; widows:0">
<span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text"
style="direction: ltr; text-align: left"><span style="font-family:'Times New Roman'; font-
size:14pt">It ' s important that every process in charge of updating a replica receives and updates
the object in the same order to maintain its consistency.</span></span> <span style="font-
family:'Times New Roman'; font-size:14pt"> .</span></span> </p><p
style="margin:0pt; orphans:0; widows:0"><span style="font-family:'Times New Roman';
font-size:14pt"> </span></p><p style="margin:0pt; orphans:0; widows:0"> <span
onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text"
style="direction: ltr; text-align: left"><span style="font-family:'Times New Roman'; font-
size:14pt">Abstraction:</span></span> <span style="font-family:'Times New Roman';
font-size:14pt">:</span></span> </p><p style="margin:0pt; orphans:0; widows:0"> <span
16. onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text"
style="direction: ltr; text-align: left"><span style="font-family:'Times New Roman'; font-
size:14pt">Pi maintains message history Xi that Pi knows.</span></span> <span style="font-
family:'Times New Roman'; font-size:14pt"> Pi .</span></span> </p><p
style="margin:0pt 0pt 0pt 18pt; orphans:0; text-indent:-18pt; widows:0"> <span
onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text"
style="direction: ltr; text-align: left"><span style="font-family:'Times New Roman'; font-
size:14pt">1.</span></span> <span style="font-family:'Times New Roman'; font-
size:14pt">1.</span></span> <span style="font:7.0pt 'Times New
Roman'"> </span> <span onmouseover="_tipon(this)"
onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left"><span
style="font-family:'Times New Roman'; font-size:14pt">When Pi sends m to
Pj:</span></span> <span style="font-family:'Times New Roman'; font-size:14pt"> ..
:</span></span> </p><p style="margin:0pt 0pt 0pt 18pt; orphans:0; widows:0"> <span
onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text"
style="direction: ltr; text-align: left"><span style="font-family:'Times New Roman'; font-
size:14pt">Put Xi on m, and send m.</span></span> <span style="font-family:'Times New
Roman'; font-size:14pt"> , .</span></span> </p><p style="margin:0pt 0pt 0pt 18pt;
orphans:0; widows:0"> <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span
class="google-src-text" style="direction: ltr; text-align: left"><span style="font-family:'Times
New Roman'; font-size:14pt">Xi = Xi + m</span></span> <span style="font-
family:'Times New Roman'; font-size:14pt"> = + m</span></span> </p><p
style="margin:0pt 0pt 0pt 18pt; orphans:0; text-indent:-18pt; widows:0"> <span
onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text"
style="direction: ltr; text-align: left"><span style="font-family:'Times New Roman'; font-
size:14pt">2.</span></span> <span style="font-family:'Times New Roman'; font-
size:14pt">2.</span></span> <span style="font:7.0pt 'Times New
Roman'"> </span> <span onmouseover="_tipon(this)"
onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left"><span
style="font-family:'Times New Roman'; font-size:14pt">Arrival of m at
Pj:</span></span> <span style="font-family:'Times New Roman'; font-size:14pt">..
:</span></span> </p><p style="margin:0pt 0pt 0pt 18pt; orphans:0; widows:0"> <span
onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text"
style="direction: ltr; text-align: left"><span style="font-family:'Times New Roman'; font-
size:14pt">If Deliveredj(Xj) includes ToPj(Xi(m))</span></span> <span style="font-
family:'Times New Roman'; font-size:14pt"> Deliveredj (Xj) ToPj ( ())</span></span>
</p><p style="margin:0pt 0pt 0pt 18pt; orphans:0; widows:0"> <span onmouseover="_tipon(this)"
onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left"><span
style="font-family:'Times New Roman'; font-size:14pt">Then deliver m</span></span>
<span style="font-family:'Times New Roman'; font-size:14pt"> </span></span> </p><p
style="margin:0pt 0pt 0pt 18pt; orphans:0; widows:0"> <span onmouseover="_tipon(this)"
17. onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left"><span
style="font-family:'Times New Roman'; font-size:14pt">Else put m in
buffer.</span></span> <span style="font-family:'Times New Roman'; font-size:14pt">
.</span></span> </p><p style="margin:0pt 0pt 0pt 18pt; orphans:0; text-indent:-18pt; widows:0">
<span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text"
style="direction: ltr; text-align: left"><span style="font-family:'Times New Roman'; font-
size:14pt">3.</span></span> <span style="font-family:'Times New Roman'; font-
size:14pt">3.</span></span> <span style="font:7.0pt 'Times New
Roman'"> </span> <span onmouseover="_tipon(this)"
onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left"><span
style="font-family:'Times New Roman'; font-size:14pt">After Pj delivers
m:</span></span> <span style="font-family:'Times New Roman'; font-size:14pt"> ..
:</span></span> </p><p style="margin:0pt 0pt 0pt 18pt; orphans:0; widows:0"> <span
onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text"
style="direction: ltr; text-align: left"><span style="font-family:'Times New Roman'; font-
size:14pt">Xj = Xj + Xi(m) + m</span></span> <span style="font-family:'Times New
Roman'; font-size:14pt">Xj = Xj + () + </span></span> </p><p style="margin:0pt 0pt 0pt
18pt; orphans:0; widows:0"> <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span
class="google-src-text" style="direction: ltr; text-align: left"><span style="font-family:'Times
New Roman'; font-size:14pt">Check buffer for possible delivery.</span></span> <span
style="font-family:'Times New Roman'; font-size:14pt"> .</span></span> </p><p
style="margin:0pt; orphans:0; widows:0"><span style="font-family:'Times New Roman';
font-size:14pt"> </span></p><p style="margin:0pt; orphans:0; widows:0"> <span
onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text"
style="direction: ltr; text-align: left"><span style="font-family:'Times New Roman'; font-
size:14pt">Implementation:</span></span> <span style="font-family:'Times New
Roman'; font-size:14pt">:</span></span> </p><p style="margin:0pt; orphans:0;
widows:0"><span style="font-family:'Times New Roman'; font-
size:14pt"> &n
bsp; </span> <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-
src-text" style="direction: ltr; text-align: left"><span style="font-family:'Times New
Roman'; font-size:14pt">How to implement Hi, Deliveredj(Hj), ToPj(Hi(m)).</span></span>
<span style="font-family:'Times New Roman'; font-size:14pt">, (HJ) Deliveredj, ToPj (
()) .</span></span> </p><p style="margin:0pt; orphans:0; widows:0"><span style="font-
family:'Times New Roman'; font-size:14pt"> </span></p><p style="margin:0pt;
orphans:0; widows:0"> <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span
class="google-src-text" style="direction: ltr; text-align: left"><span style="font-family:'Times
New Roman'; font-size:14pt">BSS protocol (messages are broadcast) p107</span></span>
<span style="font-family:'Times New Roman'; font-size:14pt"> ( )
p107</span></span> </p><p style="margin:0pt; orphans:0; widows:0"> <span
onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text"
18. style="direction: ltr; text-align: left"><span style="font-family:'Times New Roman'; font-
size:14pt">SES protocol (messages are point to point) p107</span></span> <span style="font-
family:'Times New Roman'; font-size:14pt"> ( ) p107</span></span> </p><p
style="margin:0pt; orphans:0; widows:0"><span style="font-family:'Times New Roman';
font-size:14pt"> </span></p><p style="margin:0pt; orphans:0; widows:0"> <span
onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text"
style="direction: ltr; text-align: left"><span style="font-family:'Times New Roman'; font-
size:14pt">BSS protocol (messages are broadcast) p107</span></span> <span style="font-
family:'Times New Roman'; font-size:14pt"> ( ) p107</span></span> </p><p
style="margin:0pt; orphans:0; widows:0"> <span onmouseover="_tipon(this)"
onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left"><span
style="font-family:'Times New Roman'; font-size:14pt">Each process Pi maintains a
vector X[1..n].i: the message history that Pi knows.</span></span> <span style="font-
family:'Times New Roman'; font-size:14pt"> Pi : Pi [1 .. n] .</span></span>
</p><p style="margin:0pt; orphans:0; widows:0"> <span onmouseover="_tipon(this)"
onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left"><span
style="font-family:'Times New Roman'; font-size:14pt">X[ I ].i: # messages Pi has
sent.</span></span> <span style="font-family:'Times New Roman'; font-size:14pt"> [] :
# Pi .</span></span> </p><p style="margin:0pt; orphans:0; widows:0"> <span
onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text"
style="direction: ltr; text-align: left"><span style="font-family:'Times New Roman'; font-
size:14pt">X[j].i: # messages sent from Pj that Pi has delivered.</span></span> <span
style="font-family:'Times New Roman'; font-size:14pt"> [] :. .. Pi .</span></span>
</p><p style="margin:0pt; orphans:0; widows:0"><span style="font-family:'Times New
Roman'; font-size:12pt"> </span><img src="./Translated version of logical
clock.doc_files/image_0.png" width="482" height="218" alt="" style="margin-left:0pt; margin-
top:9pt; position:absolute; z-index:0"></p><p style="margin:0pt; orphans:0; widows:0"><span
style="font-family:'Times New Roman'; font-size:12pt"> </span><img
src="./Translated version of logical clock.doc_files/image_1.png" width="38" height="38" alt=""
style="margin-left:9pt; margin-top:0pt; position:absolute; z-index:13"><img src="./Translated
version of logical clock.doc_files/image_2.png" width="62" height="2" alt="" style="margin-
left:36pt; margin-top:9pt; position:absolute; z-index:12"><img src="./Translated version of logical
clock.doc_files/image_3.png" width="86" height="74" alt="" style="margin-left:45pt; margin-top:9pt;
position:absolute; z-index:2"><img src="./Translated version of logical
clock.doc_files/image_4.png" width="110" height="146" alt="" style="margin-left:45pt; margin-
top:9pt; position:absolute; z-index:1"></p><p style="margin:0pt; orphans:0; widows:0"><span
style="font-family:'Times New Roman'; font-size:14pt"> </span></p><p
style="margin:0pt; orphans:0; widows:0"><span style="font-family:'Times New Roman';
font-size:14pt"> </span></p><p style="margin:0pt; orphans:0; widows:0"><span style="font-
family:'Times New Roman'; font-size:12pt"> </span><img src="./Translated
version of logical clock.doc_files/image_5.png" width="26" height="26" alt="" style="margin-
19. left:27pt; margin-top:0pt; position:absolute; z-index:7"><img src="./Translated version of logical
clock.doc_files/image_3.png" width="86" height="74" alt="" style="margin-left:171pt; margin-
top:9pt; position:absolute; z-index:6"><img src="./Translated version of logical
clock.doc_files/image_6.png" width="62" height="74" alt="" style="margin-left:144pt; margin-
top:9pt; position:absolute; z-index:5"><img src="./Translated version of logical
clock.doc_files/image_7.png" width="206" height="2" alt="" style="margin-left:45pt; margin-top:9pt;
position:absolute; z-index:3"></p><p style="margin:0pt; orphans:0; widows:0"><span style="font-
family:'Times New Roman'; font-size:12pt"> </span><img src="./Translated
version of logical clock.doc_files/image_8.png" width="50" height="38" alt="" style="margin-
left:81pt; margin-top:9pt; position:absolute; z-index:11"><img src="./Translated version of logical
clock.doc_files/image_9.png" width="50" height="38" alt="" style="margin-left:162pt; margin-
top:9pt; position:absolute; z-index:10"><img src="./Translated version of logical
clock.doc_files/image_10.png" width="38" height="38" alt="" style="margin-left:207pt; margin-
top:0pt; position:absolute; z-index:9"></p><p style="margin:0pt; orphans:0; widows:0"><span
style="font-family:'Times New Roman'; font-size:14pt"> </span></p><p
style="margin:0pt; orphans:0; widows:0"><span style="font-family:'Times New Roman';
font-size:12pt"> </span><img src="./Translated version of logical
clock.doc_files/image_11.png" width="26" height="38" alt="" style="margin-left:36pt; margin-
top:0pt; position:absolute; z-index:8"><img src="./Translated version of logical
clock.doc_files/image_12.png" width="290" height="2" alt="" style="margin-left:45pt; margin-
top:9pt; position:absolute; z-index:4"></p><p style="margin:0pt; orphans:0; widows:0"><span
style="font-family:'Times New Roman'; font-size:14pt"> </span></p><p
style="margin:0pt; orphans:0; widows:0"><span style="font-family:'Times New Roman';
font-size:14pt"> </span></p><p style="margin:0pt 0pt 0pt 18pt; orphans:0; text-indent:-18pt;
widows:0"> <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-
text" style="direction: ltr; text-align: left"><span style="font-family:'Times New Roman';
font-size:14pt">1.</span></span> <span style="font-family:'Times New Roman'; font-
size:14pt">1.</span></span> <span style="font:7.0pt 'Times New
Roman'"> </span> <span onmouseover="_tipon(this)"
onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left"><span
style="font-family:'Times New Roman'; font-size:14pt">when broadcast a message m,
Pi does:</span></span> <span style="font-family:'Times New Roman'; font-size:14pt">
, PI :</span></span> </p><p style="margin:0pt; orphans:0; widows:0"> <span
onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text"
style="direction: ltr; text-align: left"><span style="font-family:'Times New Roman'; font-
size:14pt">put Xi on m</span></span> <span style="font-family:'Times New Roman';
font-size:14pt"> </span></span> </p><p style="margin:0pt; orphans:0; widows:0"> <span
onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text"
style="direction: ltr; text-align: left"><span style="font-family:'Times New Roman'; font-
size:14pt">X[ I ].i++</span></span> <span style="font-family:'Times New Roman'; font-
size:14pt"> [] + +</span></span> </p><p style="margin:0pt 0pt 0pt 18pt; orphans:0; text-indent:-
20. 18pt; widows:0"> <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span
class="google-src-text" style="direction: ltr; text-align: left"><span style="font-family:'Times
New Roman'; font-size:14pt">2.</span></span> <span style="font-family:'Times New
Roman'; font-size:14pt">2.</span></span> <span style="font:7.0pt 'Times New
Roman'"> </span> <span onmouseover="_tipon(this)"
onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left"><span
style="font-family:'Times New Roman'; font-size:14pt">Pj receives a message m with
Xi(m) on it from Pi.</span></span> <span style="font-family:'Times New Roman'; font-
size:14pt">.. Pi () .</span></span> </p><p style="margin:0pt; orphans:0; widows:0"> <span
onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text"
style="direction: ltr; text-align: left"><span style="font-family:'Times New Roman'; font-
size:14pt">If</span></span> <span style="font-family:'Times New Roman'; font-
size:14pt"></span></span> </p><p style="margin:0pt 0pt 0pt 42.75pt; orphans:0; text-indent:-
18.75pt; widows:0"> <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span
class="google-src-text" style="direction: ltr; text-align: left"><span style="font-family:'Times
New Roman'; font-size:14pt">(a)</span></span> <span style="font-family:'Times New
Roman'; font-size:14pt">()</span></span> <span style="font:7.0pt 'Times New
Roman'"> </span> <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span
class="google-src-text" style="direction: ltr; text-align: left"><span style="font-family:'Times
New Roman'; font-size:14pt">X[i].j = X[ I ].i(m) and</span></span> <span style="font-
family:'Times New Roman'; font-size:14pt"> [] . = []. () </span></span> </p><p
style="margin:0pt 0pt 0pt 42.75pt; orphans:0; text-indent:-18.75pt; widows:0"> <span
onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text"
style="direction: ltr; text-align: left"><span style="font-family:'Times New Roman'; font-
size:14pt">(b)</span></span> <span style="font-family:'Times New Roman'; font-
size:14pt">()</span></span> <span style="font:7.0pt 'Times New Roman'">
</span> <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text"
style="direction: ltr; text-align: left"><span style="font-family:'Times New Roman'; font-
size:14pt">X[k].j >= X[k].i(m), for all k, k =/ i.</span></span> <span style="font-
family:'Times New Roman'; font-size:14pt">X [] .> = [] (). , , = / .</span></span>
</p><p style="margin:0pt 0pt 0pt 24pt; orphans:0; widows:0"> <span onmouseover="_tipon(this)"
onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left"><span
style="font-family:'Times New Roman'; font-size:14pt">Then deliver m</span></span>
<span style="font-family:'Times New Roman'; font-size:14pt"> </span></span> </p><p
style="margin:0pt 0pt 0pt 24pt; orphans:0; widows:0"> <span onmouseover="_tipon(this)"
onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left"><span
style="font-family:'Times New Roman'; font-size:14pt">Else put m in the
buffer.</span></span> <span style="font-family:'Times New Roman'; font-size:14pt">
.</span></span> </p><p style="margin:0pt 0pt 0pt 18pt; orphans:0; text-indent:-18pt; widows:0">
<span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text"
style="direction: ltr; text-align: left"><span style="font-family:'Times New Roman'; font-