algorithmsynchronizationdistributed-computingsystem-clock

What does it mean by "partial ordering" and "total ordering" in the discussion of Lamport's synchronization Algorithm?


What I understand is, partial ordering and total ordering are two sets of rules.

Partial ordering has Three rules:

  1. Rule 1 (Within a Process): If a and b are two events in the same process and a occurs before b, then a → b.
  2. Rule 2 (Message Passing): If a is the sending of a message and b is the receipt of that message in another process, then a → b.
  3. Rule 3 (Transitivity): If a → b and b → c, then a → c.

What is total ordering then?

Why are the named so?


Solution

  • Those names stem form the fact that in a partial order not all elements are comparable while in a total order all elements are comparable:

    A partial order on the elements of a set is defined by three properties that have to hold for all elements a, b and c:

    This definition capture the essence of the common intuition of what it means to order things: each thing is the same "size" as itself, it can be "smaller" than an other but then the other is not "smaller" than itself. Finally if a thing is "smaller" than an other, which is "smaller" than a third then it is also "smaller" than the third.

    A total order is a partial order with the additional property:

    This definition says that in a total order any two things are comparable. Wheras in a partial order a thing needs neither to be "smaller" than an other nor the other way around, in a total order each thing is either "smaller" than an other or the other way around.