1,117 views
3 votes
3 votes
Suppose Host A is connected to another Host B via a switch. The data rate of the link connecting the hosts to the switch is Rbps. Assume a packet length of L bits. In the calculation below, ignore processing, propagation and queuing delay.

A ---- S ---- B

If circuit switching was used to forward the packet, how much time would it take to send the packet from A to B after connection establishment? Assume a dedicated wire is allocated to the connection (not TDM).  If using packet switching, how much time would it take to send the packet from A to B?

Suppose, you have a 1 Mbps link being shared by 3 users at a switch. Each user is active only 10% of the time and when active needs 400 kbps. If packet switching was being used, for what fraction of the time (expressed in percentage) can the queue at the switch grow?

1 Answer

0 votes
0 votes
Let's analyze the scenarios of circuit switching and packet switching separately:

### Circuit Switching:

In circuit switching, a dedicated path is established between the sender (A) and the receiver (B) for the entire duration of the communication. The time it takes to send a packet is the sum of the time it takes to send the packet and the time it takes to establish the connection.

1. **Time to Establish Connection:**
   - Assuming no processing delay for simplicity, the time to establish the connection is the time to set up the circuit, which can be considered negligible compared to the transmission time.
  
2. **Time to Send Packet:**
   - The time to send the packet is the transmission time of the packet from A to B.
   - Transmission time (T_transmission) can be calculated using the formula: \(T_{\text{transmission}} = \frac{L}{R}\), where \(L\) is the packet length in bits, and \(R\) is the data rate.

So, the total time to send the packet using circuit switching is the sum of the time to establish the connection and the time to send the packet.

### Packet Switching:

In packet switching, the packet is divided into smaller units (packets) and sent independently. Each packet is routed independently through the network.

1. **Time to Send Packet:**
   - The time to send the packet is the transmission time of the packet from A to B. This is the same as in circuit switching.

2. **Queueing Delay:**
   - In packet switching, there might be queueing delay if the switch is busy. The queueing delay (T_queue) can be calculated using the formula: \(T_{\text{queue}} = \frac{P}{\text{link capacity}}\), where \(P\) is the packet size in bits.

So, the total time to send the packet using packet switching is the sum of the time to send the packet and the queueing delay.

### Queue Growth in Packet Switching:

For the shared 1 Mbps link with 3 users, each active 10% of the time and needing 400 kbps when active:

1. **Effective Capacity of the Link:**
   - The effective capacity of the link during the active time of each user is \(0.1 \times 1 \text{ Mbps} = 100 \text{ kbps}\).
  
2. **Total Required Capacity:**
   - The total required capacity for all 3 users is \(3 \times 400 \text{ kbps} = 1200 \text{ kbps}\).
  
3. **Queue Growth:**
   - The queue can grow during the inactive times of the users. The unused capacity during the inactive times is \(100 \text{ kbps} \times 3 = 300 \text{ kbps}\).
   - The fraction of the time the queue can grow is the ratio of the unused capacity to the total required capacity, i.e., \(\frac{300 \text{ kbps}}{1200 \text{ kbps}} = 0.25\) or 25%.

In summary:

- **Circuit Switching:** Total time ≈ Time to establish connection + Time to send packet
- **Packet Switching:** Total time ≈ Time to send packet + Queueing delay

- **Queue Growth (Packet Switching):** 25% of the time

Related questions

0 votes
0 votes
1 answer
3
LavTheRawkstar asked Nov 21, 2016
1,054 views
what is the difference among all the three in easy own understandable words?