When a process sends a message, it includes its counter with the message • On receiving a message, receiver’s counter = max(received counter, own counter) + 1 5VFTEBZ 4FQUFNCFS
process, a->b if event ‘a’ occur before ‘b’ • if ‘a’ is the sending of a message and ‘b’ is the reception of the message sent in event ‘a’, a->b 5VFTEBZ 4FQUFNCFS
internal event, it increments its own logical clock in the vector by one • Each time a process prepares to send a message, it increments its own logical clock in the vector by one and then send its entire vector along with the message being sent • Each time a process receives a message, 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 message • http://en.wikipedia.org/wiki/Vector_clocks 5VFTEBZ 4FQUFNCFS
0 to numberOfElements by 1 IF own[i] > other[i] THEN greater = true ELSE own[i] < other[i] less = true IF greater AND less THEN RETURN true ELSE RETURN false 5VFTEBZ 4FQUFNCFS