CS Atlas GATE 2027
Computer Networks course
0 / 90 complete

Computer Networks/Phase 1 · Layering, Switching & Performance

Lesson 1.2.2 · Item 15 of 90

Packet switching: store-and-forward, datagrams, statistical multiplexing

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

On this page

Recall warm-up

  1. Rate of one circuit when a 1.536 Mbps link carries 24 circuits?
    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

  2. What is the network-layer PDU called?
    Stuck? Peek at 1.1.3 Encapsulation, headers, PDU names, addresses and devices per layer
    • Encapsulation: payload + header (+ trailer at data link); decapsulation in reverse.
    • PDUs: message (app) → segment (transport) → packet/datagram (network) → frame (data link) → bits.
    • Addresses: link (per hop, changes) · network (end to end, fixed) · which-program id · names.
    • Devices: hub/repeater 1 · bridge/switch 2 · router 3 · gateway/host up to 7.
    • Efficiency = data / (data + all headers + trailer).

    Read lesson 1.1.3

  3. P(none of n sends) for probability p each?
    Stuck? Peek at 0.2.4 Exponents, logarithms and basic probability
    • 2ᵃ·2ᵇ = 2ᵃ⁺ᵇ; 2¹⁰ ≈ 10³ (estimates only).
    • log₂ x = power of 2 giving x; bits for N values = ⌈log₂ N⌉.
    • P(none) = (1−p)ⁿ · P(≥ 1) = 1 − (1−p)ⁿ · P(exactly 1) = n·p·(1−p)ⁿ⁻¹.
    • (1 − 1/n)ⁿ → 1/e ≈ 0.368; 1/(2e) ≈ 0.184.
    • 1 + 2 + … + 2ᵏ⁻¹ = 2ᵏ − 1; expected tries = 1/p.

    Read lesson 0.2.4

The Hook

Posting letters instead of phoning: nobody books the roads in advance. Each letter carries its full destination address, sorting offices pass it along to the next office, and two letters to the same place may even take different routes. If many letters arrive at once, they wait in a pile. This is packet switching — the way the Internet works.

Predict First

A router receives a packet on one link and must send it on another. Can it start sending the first bit out before the last bit has arrived?

,

Not in store-and-forward switching: the router must receive the whole packet, store it, check it, then forward it. So every hop costs the full time to push the packet out again. (This is why splitting a message into smaller packets speeds things up — the pieces pipeline across hops.)

Core Concept

Packets and no reservation

Packet switching: the message is split into packets, each with a header carrying the destination address. Links are not reserved; each packet uses a link only while it is being sent, at the link's full rate.
Circuit
reserve first, then stream at R/n
Packet
no reservation, send each packet at the full rate R when the link is free
Packet switching gives up guarantees to use links fully.

Store-and-forward

A switch (router) receives an entire packet, stores it in a buffer, then forwards it on the next link. If the outgoing link is busy, the packet waits in a queue. If the buffer is full, arriving packets are dropped (packet loss).

Link 1
P1
Link 2
P1
Link 3
P1
0123
time (packet send-times)
One packet over 3 links: each router waits for the whole packet before re-sending it, so the packet pays one full sending time per link.

The datagram approach

In the datagram approach every packet is handled independently: each router looks at the destination address in the header, consults its own lookup table of directions, and sends the packet on. Consequences:

  • No setup phase — send immediately.
  • Packets of one message may take different routes and arrive out of order; the receiver must reorder them.
  • A failed router only affects packets passing through it; others route around it.
P1P2P1P2SR1R2R3D
Two packets of one message (P1, P2) take different routes and may arrive out of order.

Statistical multiplexing

Because nothing is reserved, link capacity is shared on demand: whoever has packets uses the link. If users are active only part of the time, many more users can share a link than circuit switching could admit — at the risk of occasional queueing and loss when too many are active together.

To quantify the risk we need the chance that exactly k of n independent users are active: C(n, k) · pᵏ · (1 − p)ⁿ⁻ᵏ, where C(n, k) = n! / (k!(n − k)!) counts the ways to choose which k users are active. (For k = 1 this is the n·p·(1 − p)ⁿ⁻¹ of Lesson 0.2.4.)

10circuit35packet
Circuit switching admits 10 users. Packet switching can serve 35 with only a 0.04 % chance that more than 10 are active at once.

Putting it together

  • Packet switching reserves nothing; packets use links on demand at full rate.
  • Store-and-forward makes every hop wait for the whole packet; queues build and can overflow.
  • Statistical multiplexing lets many bursty users share a link with small risk.

Visual

Circuit switchingPacket switching (datagram)
Reservationyes, whole pathnone
Setup phaseyesno
Pathfixedper packet, may differ
Orderalways in ordermay arrive out of order
Queueing / lossnone on the pathpossible at every router
Use of idle capacitywastedshared by others
The two big ideas side by side.

Worked Examples

Easy

One packet takes 8 ms to be pushed onto each link. It crosses 3 links (2 routers) by store-and-forward. Ignoring every other delay, when does it fully arrive?

Show the full solution

Each link needs the whole packet sent again: 3 × 8 = 24 ms.

Medium

10 users share a link that can carry 3 active users at full speed. Each user is active with probability 0.2, independently. What is the probability that more than 3 are active (4 decimals)?

Show the full solution

P(X > 3) = 1 − Σₖ₌₀³ C(10, k)·0.2ᵏ·0.8¹⁰⁻ᵏ. Computing each term and summing: P(X ≤ 3) = 0.8791, so P(X > 3) = 0.1209.

GATE

A 1 Mbps link is shared by users who each need 100 kbps when active and are active 10 % of the time, independently. (a) How many users can circuit switching support? (b) With packet switching and 35 users, what is the probability that more than 10 are active at once (6 decimals)?

Show the full solution

(a) 1 Mbps / 100 kbps = 10 users.

(b) P(X > 10) = Σₖ₌₁₁³⁵ C(35, k)·0.1ᵏ·0.9³⁵⁻ᵏ = 0.000424 (computed term by term). So 35 users get circuit-like service 99.96 % of the time.

GATE Traps

  • Store-and-forward means the router waits for the entire packet before forwarding — the sending time is paid again on every link.
  • Datagram packets can arrive out of order; circuit-switched data cannot.
  • Packet switching can lose packets when buffers overflow; circuit switching does not queue on the path.

Memory Hook

"Circuit = book the road. Packet = post the letters."

Connect the Dots

Datagrams are flexible but every packet carries a full address and may wander. Next (1.2.3): can we get packet switching's sharing with circuit switching's fixed path — set up a path once, then let small-labelled packets follow it?

Self-Test

  1. NAT

    A packet takes 2 ms to be pushed onto each link. Store-and-forward over 5 links, other delays ignored. Arrival time in ms?

    Write your answer before opening the key.

  2. MSQ

    Which are true of datagram packet switching?

    1. Each packet carries the full destination address.
    2. A path is reserved before sending.
    3. Packets may arrive out of order.
    4. Packets may be dropped when buffers are full.
  3. MCQ

    Packet switching lets more users share a link than circuit switching mainly because:

    1. packets are smaller than circuits
    2. users are not all active at the same time
    3. routers are faster than circuit switches
    4. packets never wait
  4. NAT

    4 users, each active with probability 0.5 independently. P(exactly 2 active)? (3 decimals)

    Write your answer before opening the key.

Rule Card

  • Packet switching: packets with headers; no reservation; full link rate while sending.
  • Store-and-forward: receive whole packet → buffer/queue → forward; full buffer → loss.
  • Datagram: each packet routed independently; may reorder; robust to failures.
  • Statistical multiplexing: share capacity on demand; P(exactly k of n) = C(n,k)pᵏ(1−p)ⁿ⁻ᵏ.

Concept Ledger

  • packet switching
  • store-and-forward
  • buffer, queue
  • packet loss on overflow
  • datagram approach
  • out-of-order arrival
  • statistical multiplexing
  • C(n, k) and P(exactly k of n)

Answer Vault

Try the questions first. Open when you are ready to check.

Warm-up answers

  1. 64 kbps.
  2. A packet (datagram).
  3. (1 − p)ⁿ.

Self-test answers

  1. 10 — 5 × 2 = 10 ms.
  2. ACD — Independent packets with full addresses; no reservation; reordering and loss are possible.
    • B: No reservation in the datagram approach.
  3. B — Statistical multiplexing exploits that bursty users are rarely all active together.
    • A: Size is not the reason; on-demand sharing is.
    • C: Speed of boxes is not the point.
    • D: Packets can wait in queues.
  4. 0.375 — C(4, 2) × 0.5⁴ = 6/16 = 0.375.

Flashcards

  1. Store-and-forward?
    Reveal answerA router receives the whole packet before forwarding it.
  2. Datagram approach?
    Reveal answerEach packet is routed independently using its own destination address.
  3. P(exactly k of n active)?
    Reveal answerC(n, k)·pᵏ·(1 − p)ⁿ⁻ᵏ.
  4. Why can packets arrive out of order?
    Reveal answerDifferent packets of one message may take different routes.

Exam shortcuts

  • One packet, h links, store-and-forward: h × (packet bits / rate) for sending (travel times added in 1.3.2). — equal-rate links, one packet, no queueing.
  • Circuit users = R / per-user rate; packet risk = P(more than that many active) by the binomial sum. — independent users with the same activity probability.

Ready for the next idea?

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