Buffl

Communications

CF
by Carmen F.

Checksum Principle

1) The sender takes a payload 𝒑𝒍𝒐𝒂𝒅 from some upper layer constructs a suitable header 𝒉𝒅𝒓 for it and concatenates both to create a PDU as 𝑷𝑫𝑼 = 𝒉𝒅𝒓 | 𝒑𝒍𝒐𝒂𝒅

2) The sender calculates a binary word 𝒄𝒉𝒌𝒔𝒖𝒎 = 𝑓(𝑷𝑫𝑼), called a checksum, from the PDU by using a suitable checksum algorithm 𝑓

> The function 𝑓 should be nonlinear, so that small changes (e. g. single bit flips) in the PDU’s data will lead to a different value for the checksum with a high probability

3) The sender constructs a frame to send 𝒔 by appending the checksum to the PDU, i. e. 𝒔 = 𝑷𝑫𝑼 | 𝒄𝒉𝒌𝒔𝒖𝒎, and sends 𝒔 over the communication link to the receiver

> Alternatively, the checksum might be included in the PDU’s header as a separate field

4) The receiver receives the frame 𝒔′ = 𝑷𝑫𝑼′| 𝒄𝒉𝒌𝒔𝒖𝒎′, which might or might not be equal to the originally sent frame 𝒔, due to transmission errors

5) The receiver calculates its own checksum 𝒄𝒉𝒌𝒔𝒖𝒎′′ = 𝑓(𝑷𝑫𝑼′), using the same function 𝑓 as the sender, and compares it with the received checksum 𝒄𝒉𝒌𝒔𝒖𝒎′ - this can result in one of two outcomes:

I. Both checksum values are equal, i. e. 𝒄𝒉𝒌𝒔𝒖𝒎′′ = 𝒄𝒉𝒌𝒔𝒖𝒎’; in this case, the frame is accepted as correct and processed by the receiver

II. The checksum values differ, i. e. 𝒄𝒉𝒌𝒔𝒖𝒎′′ ≠ 𝒄𝒉𝒌𝒔𝒖𝒎’; in this case, the whole (!) frame is treated as erroneous and discarded by the receiver

reliable multicast emulation

Each member 𝑚𝑒𝑚𝑏𝑒𝑟𝑖 (with 𝑖 = 1 … 𝑔 ) of a closed group 𝑔 maintains a set of received messages 𝑅𝑒𝑐 which is initialised as the empty set

When a member wants to send a message 𝑚, it uses reliable point-to-point communication as in the emulation approach

When 𝑚𝑒𝑚𝑏𝑒𝑟𝑖 receives a message 𝑚 it performs the following steps:

  • If 𝑚 is in the set 𝑅𝑒𝑐 (i. e. was already received before), the message is discarded and the member continues to wait for messages again

  • Otherwise, 𝑚 is added to 𝑅𝑒𝑐

  • (send-loop): If the sender of 𝑚 (as seen in the message’s header) is not equal to the receiver 𝑚𝑒𝑚𝑏𝑒𝑟𝑖 (i. e. it was not a self-receipt by the sender):

    • Send 𝑚 to every member of 𝑔 via reliable point-to-point communication as in the emulation approach

  • (deliver-action): Deliver 𝑚 to the member’s process for processing

When the (original or another) sender of a message 𝑚 fails between two send operations, there is always at least one other member that reliably received 𝑚 (as guaranteed by the reliable point-to-point communication) and that can send 𝑚 to the remaining members

Even when a receiving member’s process fails right after the member’s middleware received 𝑚, this is not a problem as:

  • either there is at least one other correct member that can send 𝑚 to the remaining members

  • or 𝑚 will not be sent to any other member at all because every member that received 𝑚 so far has failed


Author

Carmen F.

Information

Last changed