![Page 1: Statistical Multiplexing End-to-End Principle EE122 TAs 9/7/12](https://reader036.vdocument.in/reader036/viewer/2022062511/55170950550346fe558b5241/html5/thumbnails/1.jpg)
Statistical Multiplexing End-to-End Principle
EE122 TAs9/7/12
![Page 2: Statistical Multiplexing End-to-End Principle EE122 TAs 9/7/12](https://reader036.vdocument.in/reader036/viewer/2022062511/55170950550346fe558b5241/html5/thumbnails/2.jpg)
Statistical MultiplexingSharing of a single link over multiple flows on
demand, allocating only for the average bandwidth needed
![Page 3: Statistical Multiplexing End-to-End Principle EE122 TAs 9/7/12](https://reader036.vdocument.in/reader036/viewer/2022062511/55170950550346fe558b5241/html5/thumbnails/3.jpg)
Statistical MultiplexingSharing of a single link over multiple flows on
demand, allocating only for the average bandwidth needed
Packet Switching or Circuit Switching?Packet Switching or Circuit Switching?
![Page 4: Statistical Multiplexing End-to-End Principle EE122 TAs 9/7/12](https://reader036.vdocument.in/reader036/viewer/2022062511/55170950550346fe558b5241/html5/thumbnails/4.jpg)
Statistical MultiplexingSharing of a single link over multiple flows on
demand, allocating only for the average bandwidth needed
Packet Switching or Circuit Switching?Packet Switching or Circuit Switching?
![Page 5: Statistical Multiplexing End-to-End Principle EE122 TAs 9/7/12](https://reader036.vdocument.in/reader036/viewer/2022062511/55170950550346fe558b5241/html5/thumbnails/5.jpg)
Hotel Telephone Operator
Colin, Andrew, Panda, Thurston and Scott check into Hotel Durant, which accommodates 5
Once in a while, one of them makes a call using the hotel telephone
Sometimes two of them call at the same time…Sometimes three of them call at the same time…
![Page 6: Statistical Multiplexing End-to-End Principle EE122 TAs 9/7/12](https://reader036.vdocument.in/reader036/viewer/2022062511/55170950550346fe558b5241/html5/thumbnails/6.jpg)
Hotel Telephone Operator Kay
Hey Joshua, did you report your lecture participation to
[email protected] yet?
![Page 7: Statistical Multiplexing End-to-End Principle EE122 TAs 9/7/12](https://reader036.vdocument.in/reader036/viewer/2022062511/55170950550346fe558b5241/html5/thumbnails/7.jpg)
Hotel Telephone Operator Kay
Hey Joshua, did you report your lecture participation to
[email protected] yet?
Yeah, the HW looks long, so get started
early. Hint hint.
![Page 8: Statistical Multiplexing End-to-End Principle EE122 TAs 9/7/12](https://reader036.vdocument.in/reader036/viewer/2022062511/55170950550346fe558b5241/html5/thumbnails/8.jpg)
Hotel Telephone Operator Kay
Hey Joshua, did you report your lecture participation to
[email protected] yet?
Yeah, the HW looks long, so get started
early. Hint hint.
Mmm… Cadbury chocolate
![Page 9: Statistical Multiplexing End-to-End Principle EE122 TAs 9/7/12](https://reader036.vdocument.in/reader036/viewer/2022062511/55170950550346fe558b5241/html5/thumbnails/9.jpg)
Hotel Telephone Operator
Sometimes four of them call at the same time…Sometimes all five call at the same time…
Let’s say each phone conversation lasts 5 minutes (300 seconds) on average.
There are 86400 seconds in a day… what are the chances these calls will overlap?
Not very high...
![Page 10: Statistical Multiplexing End-to-End Principle EE122 TAs 9/7/12](https://reader036.vdocument.in/reader036/viewer/2022062511/55170950550346fe558b5241/html5/thumbnails/10.jpg)
Hotel Telephone Operator
How many lines do we need?Do we need all 5?Let’s say we allocate 3.
What will happen if all 5 call at the same time?
![Page 11: Statistical Multiplexing End-to-End Principle EE122 TAs 9/7/12](https://reader036.vdocument.in/reader036/viewer/2022062511/55170950550346fe558b5241/html5/thumbnails/11.jpg)
Hotel Telephone Operator Kay
GO SPAIN!!!
ITALY!!!
Mmm… Hershey’s
SPAIN!!!
GO ITALY!
![Page 12: Statistical Multiplexing End-to-End Principle EE122 TAs 9/7/12](https://reader036.vdocument.in/reader036/viewer/2022062511/55170950550346fe558b5241/html5/thumbnails/12.jpg)
Hotel Telephone Operator
How many lines do we need?Do we need all 5?Let’s say we allocate 3.
What will happen if all 5 call at the same time?Not everyone can be serviced, and there will be some dropped calls.But the probability of this happening is very low.
![Page 13: Statistical Multiplexing End-to-End Principle EE122 TAs 9/7/12](https://reader036.vdocument.in/reader036/viewer/2022062511/55170950550346fe558b5241/html5/thumbnails/13.jpg)
A Similar Problem
The WorldShared Link
Alice, Bob, Eve and Mallory each have a cat videoThey want to broadcast this to the worldBut they share a single link to the world
![Page 14: Statistical Multiplexing End-to-End Principle EE122 TAs 9/7/12](https://reader036.vdocument.in/reader036/viewer/2022062511/55170950550346fe558b5241/html5/thumbnails/14.jpg)
A Similar Problem
The World
First they tried sharing the link by dividing the available bandwidth evenly
TOO SLOW!!
![Page 15: Statistical Multiplexing End-to-End Principle EE122 TAs 9/7/12](https://reader036.vdocument.in/reader036/viewer/2022062511/55170950550346fe558b5241/html5/thumbnails/15.jpg)
Hope For A Solution
• They could go one at a time– We decided this is bad
• But notice they are not really sending at the same time
• The chance of someone sending is a random variable
• Let us try and apply the law of large numbers
![Page 16: Statistical Multiplexing End-to-End Principle EE122 TAs 9/7/12](https://reader036.vdocument.in/reader036/viewer/2022062511/55170950550346fe558b5241/html5/thumbnails/16.jpg)
Statistical Multiplexing
The World
Better: Everyone gets more bandwidthLess wasted bandwidth, but not reserving a circuit
![Page 17: Statistical Multiplexing End-to-End Principle EE122 TAs 9/7/12](https://reader036.vdocument.in/reader036/viewer/2022062511/55170950550346fe558b5241/html5/thumbnails/17.jpg)
Statistical Multiplexing
• Works because everyone sends at random times
• What is the expected bandwidth used?• What would we need if we reserved
bandwidth for all?• When does this fail?
• TADA INTERNET
![Page 18: Statistical Multiplexing End-to-End Principle EE122 TAs 9/7/12](https://reader036.vdocument.in/reader036/viewer/2022062511/55170950550346fe558b5241/html5/thumbnails/18.jpg)
The Law of Large Numbers
The average value taken by a large set of observations of a random variables approaches the
mean of the random variable
• For our purposes– The sum of a set of random variables is
Sum = Mean × Number of Variables• Note this is smaller than
Maximum × Number of Variables
![Page 19: Statistical Multiplexing End-to-End Principle EE122 TAs 9/7/12](https://reader036.vdocument.in/reader036/viewer/2022062511/55170950550346fe558b5241/html5/thumbnails/19.jpg)
The Law of Large Numbers
• Example:– 30 end hosts, each want to send at 100kbps– But each host only sends 10% of the time
How much bandwidth do we need to guarantee that everyone gets 100kbps no matter what?
30 * 100kbps = 3Mbps
![Page 20: Statistical Multiplexing End-to-End Principle EE122 TAs 9/7/12](https://reader036.vdocument.in/reader036/viewer/2022062511/55170950550346fe558b5241/html5/thumbnails/20.jpg)
The Law of Large Numbers• Example:– 30 end hosts, each want to send at 100kbps– But each host only sends 10% of the time
How much bandwidth does the Law of Large Numbers say we need?
100kbps * 10% * 30 = 300kbps
Statistical Multiplexing says we only need a link with 300kbps, by the Law of Large Numbers.
![Page 21: Statistical Multiplexing End-to-End Principle EE122 TAs 9/7/12](https://reader036.vdocument.in/reader036/viewer/2022062511/55170950550346fe558b5241/html5/thumbnails/21.jpg)
End-to-End Principle
• Packets sometimes get lost• Have reliable links, each hop resends packets
that were lost
![Page 22: Statistical Multiplexing End-to-End Principle EE122 TAs 9/7/12](https://reader036.vdocument.in/reader036/viewer/2022062511/55170950550346fe558b5241/html5/thumbnails/22.jpg)
Host A Host B
Reliable Links
![Page 23: Statistical Multiplexing End-to-End Principle EE122 TAs 9/7/12](https://reader036.vdocument.in/reader036/viewer/2022062511/55170950550346fe558b5241/html5/thumbnails/23.jpg)
Host A Host B
Unreliable Links
![Page 24: Statistical Multiplexing End-to-End Principle EE122 TAs 9/7/12](https://reader036.vdocument.in/reader036/viewer/2022062511/55170950550346fe558b5241/html5/thumbnails/24.jpg)
End-to-End Principle
• Packets sometimes get lost• Have reliable links, each hop resends packets
that were lost• Does this violate the end-to-end principle?• Is this ever a reasonable scheme?– Remember End-To-End has an exception
• Does this violate layering?
![Page 25: Statistical Multiplexing End-to-End Principle EE122 TAs 9/7/12](https://reader036.vdocument.in/reader036/viewer/2022062511/55170950550346fe558b5241/html5/thumbnails/25.jpg)
The 5 Layers
Application
Transport
Network
Datalink
Physical
L5
L1
![Page 26: Statistical Multiplexing End-to-End Principle EE122 TAs 9/7/12](https://reader036.vdocument.in/reader036/viewer/2022062511/55170950550346fe558b5241/html5/thumbnails/26.jpg)
End-to-End Principle
• One needs a more perfect mechanism for delivering cat video
• Introducing the LOLCat Switch• Produce a cat video at the switch– Given a description of the kind of cat, props, and
witty caption, network switches will assemble a cat video
– Really fast, don’t need to go beyond the first hop– Ever!!!
![Page 27: Statistical Multiplexing End-to-End Principle EE122 TAs 9/7/12](https://reader036.vdocument.in/reader036/viewer/2022062511/55170950550346fe558b5241/html5/thumbnails/27.jpg)
Host A Host B
LOLCat SwitchKind of CatDescription
Witty Captioncat253.avi
![Page 28: Statistical Multiplexing End-to-End Principle EE122 TAs 9/7/12](https://reader036.vdocument.in/reader036/viewer/2022062511/55170950550346fe558b5241/html5/thumbnails/28.jpg)
End-to-End Principle
• Does this violate the end-to-end principle?• Does it violate layering?• Why is this a bad idea?– Duplicating application functionality– Unnecessarily complicating network– Inflexible switch design
![Page 29: Statistical Multiplexing End-to-End Principle EE122 TAs 9/7/12](https://reader036.vdocument.in/reader036/viewer/2022062511/55170950550346fe558b5241/html5/thumbnails/29.jpg)
Probability Primer
![Page 30: Statistical Multiplexing End-to-End Principle EE122 TAs 9/7/12](https://reader036.vdocument.in/reader036/viewer/2022062511/55170950550346fe558b5241/html5/thumbnails/30.jpg)
Independent Events• Independent: occurrence of one event does not
affect the likelihood of the other event• Example of two independent events:– Flow 1 sends 5 packets in a particular frame– Flow 2 sends 2 packets in a particular frame
• Assume that:– Event A happens with probability pA
– Event B happens with probability pB
• What is probability both event A and B happen?• Answer: Probability = pApB 30
![Page 31: Statistical Multiplexing End-to-End Principle EE122 TAs 9/7/12](https://reader036.vdocument.in/reader036/viewer/2022062511/55170950550346fe558b5241/html5/thumbnails/31.jpg)
Consider Dice
• Probability that rolling a single die yields a 1? 1/6th
• Probability rolling two dice yields 1 1?1/36th
• Probability rolling two dice yields a 1 and a 2?– Write it down!
31
![Page 32: Statistical Multiplexing End-to-End Principle EE122 TAs 9/7/12](https://reader036.vdocument.in/reader036/viewer/2022062511/55170950550346fe558b5241/html5/thumbnails/32.jpg)
Be Careful Counting Events
First die is 1 and second die is 2:1/36th
One die is 1 and one die is 2: 1/18th
• That’s because you could have 1 2 or 2 1
32
![Page 33: Statistical Multiplexing End-to-End Principle EE122 TAs 9/7/12](https://reader036.vdocument.in/reader036/viewer/2022062511/55170950550346fe558b5241/html5/thumbnails/33.jpg)
Mutually Exclusive Events
• First roll of die is 1:1/6th
• First roll of die is 2:1/6th
• First roll of die is 3:1/6th
• First roll of die is 4:1/6th
• First roll of die is 5:1/6th
• First roll of die is 6:1/6th
• This set of events is complete (or exhaustive) in that one of them must be true
Total of probabilities = 133
![Page 34: Statistical Multiplexing End-to-End Principle EE122 TAs 9/7/12](https://reader036.vdocument.in/reader036/viewer/2022062511/55170950550346fe558b5241/html5/thumbnails/34.jpg)
Exclusive vs Independent Events
• First roll of die is 1, second roll of die is 3– Independent
• First roll of die is 1, first roll of die is 2– Exclusive
34
![Page 35: Statistical Multiplexing End-to-End Principle EE122 TAs 9/7/12](https://reader036.vdocument.in/reader036/viewer/2022062511/55170950550346fe558b5241/html5/thumbnails/35.jpg)
Computing Averages
• Assume that x is some property of an event and that events A, B, C are mutually exclusive and complete (i.e., one of them happens)– E.g., x = number of packets sent in a particular frame
• Assume that:– Event A has x=5– Event B has x=2– Event C has x=10
• What is the average value of x? (denoted by <x>)– Write it down!
• Average <x> = 5pA + 2pB + 10pC
35
![Page 36: Statistical Multiplexing End-to-End Principle EE122 TAs 9/7/12](https://reader036.vdocument.in/reader036/viewer/2022062511/55170950550346fe558b5241/html5/thumbnails/36.jpg)
THIS IS ALL YOU NEED TO KNOW!
• The problems are easier than you think…• …but think clearly before computing the
answer…
36