CS Atlas GATE 2027
Computer Networks course
0 / 90 complete

Computer Networks/Phase 1 · Layering, Switching & Performance

Lesson 1.3.4 · Item 21 of 90

Circuit vs packet switching: delay numericals

Read at your own pace. Try the questions before opening the answers.

On this page

Recall warm-up

  1. 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.

    Read lesson 1.3.3

  2. 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.

    Read lesson 1.3.2

  3. 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.

    Read lesson 1.2.1

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:

MethodTotal time to deliver M bits
Circuit switchingsetup + 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⌉
With a circuit, the circuit rate is the reserved share (R/n) if the link is split.

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.

154circuit109.472packet (1000 b)404.096message
Same file, three methods (setup 50 ms for the circuit, 24-bit headers).

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.

031.2562.593.75125250500100020005000114.42110.37109.47111.27119.55data bits per packet ptotal delay (ms)
Total delay vs packet size for M = 10⁵ bits, H = 24 bits, 4 links: the minimum is near √(10⁵ × 24 / 3) ≈ 894 bits.

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

circuit
setupstream M/BTp
packets
(N+h−1)(p+H)/Bh·Tp
050100150
time (ms)
Circuit (setup + stream + travel) against packet pipeline (packet times + travel) for the example in this lesson.

Worked Examples

Easy

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.

Medium

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.

GATE

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

  1. 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.

  2. 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.

  3. NAT

    Same as before but sent as one 10⁴-bit message (message switching). Total in ms?

    Write your answer before opening the key.

  4. MCQ

    Why does circuit switching not multiply M/B by the number of links?

    1. Links are faster on circuits
    2. Switches forward bits as they arrive, without storing the whole message
    3. Propagation is zero on circuits
    4. Setup sends the data
  5. MSQ

    Making packets very small (with a fixed header per packet):

    1. improves pipelining
    2. increases total header overhead
    3. always minimises delay
    4. 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. 1/3.
  2. (N + h − 1)·Tt + h·Tp.
  3. Circuit switching.

Self-test answers

  1. 230 — 20 + 200 + 10 = 230 ms.
  2. 12 — (10 + 3 − 1) × 1 ms = 12 ms.
  3. 30 — 3 × 10 ms = 30 ms.
  4. 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.
  5. ABD — There is an optimum size; too small wastes bits on headers.
    • C: Past the optimum, headers dominate.

Flashcards

  1. Circuit total time?
    Reveal answersetup + M/R + h·Tp.
  2. Packet total time (equal links)?
    Reveal answer(N + h − 1)(p + H)/B + h·Tp.
  3. 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.

Ready for the next idea?

Mark this item complete when you’ve finished reading and working through it.