---
title: "Event, causal and global ordering"
subject: "Distributed System"
chapter: 5
key: "semester_7/distributed_system:event-causal-global-ordering"
source: https://www.bctengineer.com/q/semester_7/distributed_system/event-causal-global-ordering
site: BCT Engineering
---

# Event, causal and global ordering

Distributed System · Chapter 5: Time and State in Distributed Systems

- Asked in: Model question
- Video: [Event Ordering in Distributed Systems | Total, Partial & Causal Ordering](https://www.youtube.com/watch?v=mmKXBlf1ejY) — Saksham Vedi
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_7/distributed_system/event-causal-global-ordering
- Whole chapter: https://www.bctengineer.com/md/semester_7/distributed_system/chapter-5

## Question

Define event ordering, causal ordering, and global ordering with suitable examples.

## Short answer

Event ordering uses the happened-before relation: a→b if a precedes b in same process, or a is send and b is receive, or transitive. Causal ordering ensures if m1→m2 then all deliver m1 before m2 (e.g., question before answer). Global ordering ensures all processes deliver all messages in the same order, regardless of causality (e.g., replicated updates applied identically).

## Answer

#### Event ordering
Event ordering decides in which sequence the events of a distributed system (send, receive, internal events) are considered to have occurred. Within one process events are totally ordered by local time. Between processes, order is defined by the **happened-before relation (→)**: a → b if a precedes b in the same process, or a is a send and b the matching receive, or by transitivity. Events not related by → are concurrent. Example: P1 sends m1 (event a); P2 receives it (event b): a → b. Another event c on P3 with no message exchange is concurrent with both.

#### Causal ordering
Causal ordering requires that if the multicast of message m1 happened before the multicast of m2 (m1 → m2), then every process delivers m1 before m2. Concurrent messages can be delivered in any order. Implemented with vector clocks. Example: in a discussion forum, a question message Q and its answer A (sent after seeing Q) must be delivered to everybody as Q then A; an answer must never appear before its question.

#### Global (total) ordering
Global or total ordering requires that all processes deliver all messages in the **same order**, whether or not the messages are causally related. The order itself may differ from real time. Implemented with Lamport timestamps (ties broken by process id) or a sequencer. Example: two clients simultaneously update replicated account balances (deposit and interest); all replicas must apply the two updates in the same order, else they become inconsistent.

| Ordering | Guarantee |
|---|---|
| FIFO | Messages from one sender delivered in send order |
| Causal | Causally related messages delivered in order |
| Total/global | Same order of delivery at all processes |

Total ordering does not imply causal ordering unless it is built on top of it.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. What does causal ordering require?
   A. All processes deliver in the same order
   B. Delivery in real time order
   C. If m1 happened before m2, every process delivers m1 before m2
   D. Messages from one sender in FIFO only
   Answer: C. Concurrent messages may be delivered in any order. (Key point: Causal ordering)

2. What does total ordering require?
   A. Causally related messages only
   B. Real-time order
   C. Order by sender size
   D. All processes deliver all messages in the same order
   Answer: D. The order may differ from real time. (Key point: Total ordering)

3. Does total ordering imply causal ordering?
   A. Yes always
   B. No, not unless built on top of causal ordering
   C. Only for two processes
   D. Only for FIFO
   Answer: B. They are different guarantees. (Key point: Relation)
