360 likes | 588 Views
Statistical Multiplexing End-to-End Principle. EE122 TAs 9/7/12. Statistical Multiplexing. Sharing of a single link over multiple flows on demand, allocating only for the average bandwidth needed. Statistical Multiplexing.
E N D
Statistical Multiplexing End-to-End Principle EE122 TAs 9/7/12
Statistical Multiplexing Sharing of a single link over multiple flows on demand, allocating only for the average bandwidth needed
StatisticalMultiplexing Sharing 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?
StatisticalMultiplexing Sharing 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?
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…
Hey Joshua, did you report your lecture participation to ee122.andrew@gmail.com yet? Hotel Telephone Operator Kay
Hey Joshua, did you report your lecture participation to ee122.andrew@gmail.com yet? Hotel Telephone Operator Kay Yeah, the HW looks long, so get started early. Hint hint.
Hey Joshua, did you report your lecture participation to ee122.andrew@gmail.com yet? Hotel Telephone Operator Kay Yeah, the HW looks long, so get started early. Hint hint. Mmm… Cadbury chocolate
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...
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?
GO SPAIN!!! Hotel Telephone Operator Kay SPAIN!!! ITALY!!! GO ITALY! Mmm… Hershey’s
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.
A Similar Problem The World Shared Link Alice, Bob, Eve and Mallory each have a cat video They want to broadcast this to the world But they share a single link to the world
A Similar Problem TOO SLOW!! The World First they tried sharing the link by dividing the available bandwidth evenly
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
Statistical Multiplexing The World Better: Everyone gets more bandwidth Less wasted bandwidth, but not reserving a circuit
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
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
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 guaranteethat everyone gets 100kbps no matter what? 30 * 100kbps = 3Mbps
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.
End-to-End Principle • Packets sometimes get lost • Have reliable links, each hop resends packets that were lost
Reliable Links Host A Host B
Unreliable Links Host A Host B
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?
The 5 Layers Application L5 Transport Network Datalink Physical L1
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!!!
LOLCat Switch Kind of Cat Description Witty Caption cat253.avi Host A Host B
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
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
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!
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
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 = 1
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
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
THIS IS ALL YOU NEED TO KNOW! • The problems are easier than you think… • …but think clearly before computing the answer…