---
title: "Triple modular redundancy; reliable C/S"
subject: "Distributed System"
chapter: 9
key: "semester_7/distributed_system:tmr-reliable-client-server"
source: https://www.bctengineer.com/q/semester_7/distributed_system/tmr-reliable-client-server
site: BCT Engineering
---

# Triple modular redundancy; reliable C/S

Distributed System · Chapter 9: Fault Tolerance

- Asked in: 2075 Asoj, 4+4 marks
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_7/distributed_system/tmr-reliable-client-server
- Whole chapter: https://www.bctengineer.com/md/semester_7/distributed_system/chapter-9

## Question

How does triple modular redundancy work? Explain how reliable client server communication can be achieved in distributed system.

## Short answer

Triple modular redundancy replicates each component three times and uses a majority voter to mask one faulty unit. Reliable client-server communication handles lost messages by retransmission with idempotent operations or sequence numbers, server crashes with at-least-once or at-most-once semantics, and client crashes with orphan handling such as reincarnation or expiration.

## Answer

#### Triple modular redundancy
**Triple modular redundancy (TMR)** masks hardware faults by replicating each component three times and passing the outputs through a **voter**, which outputs the majority value. A single faulty unit is outvoted by the two correct ones. Voters are also replicated, since a single voter would be a point of failure.

```text
In -> [A1] -> [V1] -> [B1] -> [V4] -> ...
   -> [A2] -> [V2] -> [B2] -> [V5] -> ...
   -> [A3] -> [V3] -> [B3] -> [V6] -> ...
   (A, B = circuits, V = voters)
```

If A2 produces a wrong output, V1, V2, V3 still output the correct one, as two of the three inputs agree. TMR tolerates one failed unit per stage (K = 1, 2K+1 = 3). It costs three times the hardware.

#### Reliable client-server communication
**Reliable client-server (RPC/RMI) communication** deals with the following failures and how to tolerate them.

| Failure | Solution |
|---|---|
| Client cannot locate server | Return an exception to the client; use a name or binding service |
| Lost request message | Client timer; retransmit the request after time-out |
| Server crash | Depends on when it crashed (see below) |
| Lost reply message | Retransmit with **idempotent** operations or sequence numbers/duplicate filtering |
| Client crash | Orphan handling |

**Server crash**: the server may crash before executing the request or after executing it but before replying; the client cannot tell the two apart. Semantics:
- **At-least-once**: the client keeps retrying until a reply arrives; the operation may run more than once (fine for idempotent operations).
- **At-most-once**: the request is never repeated; if no reply, the client gets an error.
- **Exactly-once**: ideal, but cannot be guaranteed in general.

**Client crash (orphans)**: a computation running without a parent client wastes resources and may hold locks. Solutions: **extermination** (log each call and kill orphans after reboot), **reincarnation** (broadcast a new epoch; old computations are killed), **gentle reincarnation** (kill only if the owner cannot be found), and **expiration** (each call gets a time quantum T; it is killed if not finished).

For **TCP-type reliable communication** (point-to-point), acknowledgements, sequence numbers and retransmission give reliable delivery; connection loss causes an exception which the application must handle.

## Check yourself

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

1. How does TMR mask a faulty unit?
   A. A voter outputs the majority value of three replicas
   B. The faulty unit is detected by heartbeat and replaced
   C. Three outputs are summed
   D. Outputs are retried three times
   Answer: A. Three replicas feed a voter that outputs the majority, so one faulty unit is outvoted. (Key point: TMR voting)

2. Why are the voters also replicated in TMR?
   A. To increase processing speed
   B. A single voter would be a single point of failure
   C. To allow tolerating two faulty units per stage
   D. Voters are less reliable than circuits
   Answer: B. If one voter failed, the whole stage would fail, defeating the redundancy. (Key point: Replicated voters)

3. What is a suitable solution for a lost reply message?
   A. Return an exception because server is not found
   B. Kill orphans after reboot
   C. Retransmit using idempotent operations or sequence numbers with duplicate filtering
   D. Broadcast a new epoch
   Answer: C. The client retransmits; idempotency or duplicate filtering stops repeated execution causing harm. (Key point: Lost reply)

4. Why is server crash hard to handle in RPC?
   A. The client cannot tell if the crash was before or after executing the request
   B. The request is always lost
   C. Servers cannot reboot
   D. Clients cannot time out
   Answer: A. Crash before execution and crash after execution but before reply look identical to the client, so exactly-once cannot be guaranteed. (Key point: Server crash semantics)

## Related in Distributed System

- [Reliable client-server communication](https://www.bctengineer.com/question.md?key=semester_7%2Fdistributed_system%3Areliable-client-server) — Distributed System, chapter 9
- [Short note: Reliable group communication](https://www.bctengineer.com/question.md?key=semester_7%2Fdistributed_system%3Areliable-group-comm-note) — Distributed System, chapter 9
- [Distributed objects and communication](https://www.bctengineer.com/question.md?key=semester_7%2Fdistributed_system%3Adistributed-objects-communication) — Distributed System, chapter 2, asked 2×

## Related in other subjects

- [Client-server versus distributed object architecture](https://www.bctengineer.com/question.md?key=semester_5%2Fsoftware_engineering%3Aclient-server-vs-distributed-object) — Software Engineering, chapter 3
- [Server before client; TCP reliability](https://www.bctengineer.com/question.md?key=semester_7%2Fcomputer_networks_and_security%3Atcp-server-before-client-reliability) — Computer Networks and Security, chapter 5, asked 2×
- [Client-side versus server-side scripting](https://www.bctengineer.com/question.md?key=semester_7%2Fweb_technology%3Aclient-vs-server-side-scripting) — Web Technology, chapter 3, asked 3×
- [Short note: Client-Server and Master-Slave](https://www.bctengineer.com/question.md?key=semester_8%2Fbig_data_technologies%3Ashort-note-client-server-master-slave) — Big Data Technologies, chapter 1
