Recall warm-up
- Send-and-wait utilisation when a = 1?
Stuck? Peek at 1.3.3 RTT, bandwidth-delay product, utilisation and a = Tp/Tt
- RTT = 2·Tp for tiny signals (add Tt / queuing if stated).
- BDP = B × Tp bits in flight; B × RTT before any reply.
- a = Tp / Tt.
- Send-and-wait: U = Tt/(Tt + 2Tp) = 1/(1 + 2a); throughput = U·B.
- To keep the link busy: about 1 + 2a units in flight.
- N packets over h equal links: total time?
Stuck? Peek at 1.3.2 Propagation, queuing and processing delay; multi-hop pipelining
- Tp = d / v, v = 2 × 10⁸ m/s default; independent of size and rate.
- Nodal delay = d_proc + d_queue + Tt + Tp.
- One packet, h equal links: h·Tt + h·Tp.
- N packets, h equal links: (N + h − 1)·Tt + h·Tp (+ (h − 1)·d_proc).
- Unequal links: first packet ΣTt + ΣTp, then + (N − 1) × max Tt.
- Traffic intensity L·a/R → 1: queues explode.
- Which switching method has a setup phase and reserved capacity?
Stuck? Peek at 1.2.1 Circuit switching: setup, reserved resources, teardown
- Circuit switching: setup → data transfer → teardown.
- Dedicated path; each link's share (time slot or frequency band) is reserved: circuit rate = R/n.
- Total time = setup + bits/circuit rate (+ travel time if given).
- + guaranteed rate, in order, no queues; − setup delay, idle capacity wasted, fragile.
The Hook
Should we phone (reserve a path) or post letters (packets) to send a 100,000-bit file across 4 links? Phoning costs a setup but then streams with no store-and-forward. Posting has no setup but every router waits for whole packets, and every packet pays for its header. GATE turns this choice into a two-line calculation — and asks how big the letters should be.
Predict First
4 links of 1 Mbps, Tp = 1 ms each, a 100,000-bit file. Circuit setup takes 50 ms. Packets carry 1000 data bits + 24 header bits. Guess which finishes first.
,Packets: 109.472 ms against 154 ms for the circuit. The 50 ms setup is never earned back, while the packet pipeline loses only 3 extra packet times and the header overhead.
Core Concept
Three formulas side by side
Message of M bits, h equal links of rate B, propagation Tp per link:
| Method | Total time to deliver M bits |
|---|---|
| Circuit switching | setup + M/B + h·Tp (bits stream straight through; no store-and-forward) |
| Message switching (one unit, store-and-forward) | h·(M + H)/B + h·Tp |
| Packet switching (N packets of p data + H header bits) | (N + h − 1)·(p + H)/B + h·Tp, N = ⌈M/p⌉ |
Why packets beat whole messages
Message switching makes each router wait for the entire message: h full message-times. Packets let routers work in parallel, costing only (h − 1) extra packet-times — at the price of N headers instead of one.
Choosing the packet size
Smaller packets → better pipelining but more headers. Larger packets → fewer headers but longer per-hop waits. The total (M/p + h − 1)(p + H)/B is minimised near p* = √(M·H / (h − 1)). In exams, simply compute the total for each option offered.
Putting it together
- Circuits pay setup once, then stream without store-and-forward.
- Packets pipeline across hops but pay a header per packet; whole messages wait at every hop.
- There is an optimal packet size balancing pipelining against header overhead.
Visual
Worked Examples
Circuit switching: setup 50 ms, file 10⁵ bits at 1 Mbps, 4 links with Tp = 1 ms each. Total time?
Show the full solution
50 + 10⁵/10⁶ s (= 100 ms) + 4 × 1 = 154 ms.
Same file and links, packet switching with 1000 data bits + 24 header bits per packet. Total time? And as one message with one 24-bit header (message switching)?
Show the full solution
Packets: N = 100, unit = 1024 bits, Tt = 1.024 ms. Total = (100 + 4 − 1) × 1.024 + 4 = 105.472 + 4 = 109.472 ms.
Message: 4 × 100,024/10⁶ + 4 ms = 400.096 + 4 = 404.096 ms.
Same setting. Which data size per packet gives the least total delay: 500, 1000 or 2000 bits? Give the three totals.
Show the full solution
p = 500: N = 200, unit 524 bits → (203)(0.524) + 4 = 110.372 ms.
p = 1000: 109.472 ms. p = 2000: N = 50, unit 2024 bits → (53)(2.024) + 4 = 111.272 ms.
Best: 1000 bits, consistent with p* = √(10⁵ × 24 / 3) ≈ 894.
GATE Traps
- For circuit switching do not multiply M/B by h — the bits flow through switches without being stored.
- Packet count is ⌈M/p⌉: a partial last packet still costs a full slot in simple GATE-style counting unless the question sizes it exactly.
- Header bits count in each packet's Tt; forgetting them makes small packets look too good.
Memory Hook
"Phone once, talk straight; post many letters, each with an envelope."
Connect the Dots
Phase 1 is complete: layers, switching, and every delay formula. Our message now has a shape (frames, packets, segments) and a timing model. Next (Phase 2): zoom into a single hop — how does the data link layer move a frame to the next node, notice damaged bits, and share a link that many nodes want to use at once?
Self-Test
- NAT
Circuit: setup 20 ms, M = 2 × 10⁵ bits at 1 Mbps, 2 links with Tp = 5 ms. Total in ms?
Write your answer before opening the key.
- NAT
Packets: M = 10⁴ bits split into 1000-bit packets, header 0, 3 links of 1 Mbps, Tp = 0. Total in ms?
Write your answer before opening the key.
- NAT
Same as before but sent as one 10⁴-bit message (message switching). Total in ms?
Write your answer before opening the key.
- MCQ
Why does circuit switching not multiply M/B by the number of links?
- Links are faster on circuits
- Switches forward bits as they arrive, without storing the whole message
- Propagation is zero on circuits
- Setup sends the data
- MSQ
Making packets very small (with a fixed header per packet):
- improves pipelining
- increases total header overhead
- always minimises delay
- can make total delay grow again
Rule Card
- Circuit: setup + M/R + h·Tp.
- Message switching: h·(M + H)/B + h·Tp.
- Packet switching: (⌈M/p⌉ + h − 1)·(p + H)/B + h·Tp.
- Optimal p ≈ √(M·H/(h − 1)); in MCQs evaluate each option.
Concept Ledger
- circuit vs packet vs message switching delay
- optimal packet size
Answer Vault
Try the questions first. Open when you are ready to check.
Warm-up answers
- 1/3.
- (N + h − 1)·Tt + h·Tp.
- Circuit switching.
Self-test answers
- 230 — 20 + 200 + 10 = 230 ms.
- 12 — (10 + 3 − 1) × 1 ms = 12 ms.
- 30 — 3 × 10 ms = 30 ms.
- B — No store-and-forward on an established circuit.
- A: Rates are not faster.
- C: Propagation is still paid per link.
- D: Setup sends only signalling.
- ABD — There is an optimum size; too small wastes bits on headers.
- C: Past the optimum, headers dominate.
Flashcards
- Circuit total time?
Reveal answer
setup + M/R + h·Tp. - Packet total time (equal links)?
Reveal answer
(N + h − 1)(p + H)/B + h·Tp. - Optimal packet size?
Reveal answer
≈ √(M·H/(h − 1)).
Exam shortcuts
- Circuit total = setup + M/R_circuit + h·Tp. — bits stream through switches without store-and-forward once the circuit exists.
- Optimal packet size p* ≈ √(M·H/(h − 1)). — equal links, fixed header H per packet, M ≫ p; in MCQs just evaluate each option.