200 likes | 212 Views
Dive into TCP events triggering transmission, congestion detection, and more. Learn about resource allocation dynamics, evaluation criteria, and queueing disciplines in networking. Explore fair queueing and window-based vs. rate-based approaches.
E N D
2004.5.11. • Last Class • TCP events that trigger transmission • This Class • Chapter 6.1. ~ 6.2. • Resource allocation
What do we know about TCP? • is best-effort • employs a 3-way handshake • employs flow control • is window-based
Do we know how ... • TCP detects congestion? • TCP determines the sending rate? • What the network actually does?
Network Model • So far we have assumed • packet-switched • connectionless flows • best-effort service
Topics in Resource Allocation • Traffic specification • Call admission control • Resource reservation • Scheduling
Taxonomy of Resource Allocation • Router-centric vs host-centric • Reservation based vs feedback based • Window based vs rate based
Evaluation Criteria • Any resource allocation mechanism is evaluated based on: • Effectiveness Power = Thruput/Delay • Fairness • Chiu and Jain’s • Max-Min fairness • Proportional fairness • TCP fairness
Queueing Disciplines • Schduling policy • determines the order in which packets are transmitted • FIFO, Priority Queueing, Fair Queueing • Drop policy • determines which packets to drop • Tail drop (drop-tail), RED
Priority Queueing • Main idea: mark each packet with a priority • Routers implement multiple FIFO queues • Packets in a queue with the highest priority are served first • Problem? • Bad people mark their packets with a high priority • High-priority queue can starve out all other queues
Fair Queueing • Main idea: maintain a separate queue per flow to isolate. Round-robin Service
Currently served • Calculate Fi =max(Fi-1 , Ai) + Pi and process packets with lowest Fi first • Fi : expected finish time if done bit-by-bit • Ai: arrival time of packet i • Pi : # of bit-rounds for packet i Which packet should finish first, blue or yellow?
F F F Yellow should be served first! Time 1 2 3 4 5 6 7 9 8 Bit-round
FQ and WFQ • FQ • Sources are not aware of FQ • WFQ • It assigns different weights to queues • It can assign queue not per flow, but per class • How do you assign fair weights? • Both are work-conserving • Never idle when there is work to do
At what rate to send? sender receiver How do you figure out the bottleneck bandwidth?
window-based vs rate-based sender bottleneck
TCP employs a learning algorithm • Additive increase • Slowly increase the sending rate • Multiplicative decrease • Decrease the sending rate fast when congestion is detected
Sending rate increases linearly Additive increase TIME RTT RTT RTT RTT
What about doubling each time? Multiplicative increase Cwnd=1 Cwnd=2 Cwnd=4 Cwnd=8 TIME RTT RTT RTT RTT
When to stop increasing? • Finite world, finite beginning • ssthresh = set to an arbitrary large number (65KB) • Sender rate exceeds RcvWindow • Only transmit min(cwnd, RcvWindow) • Packets start to be dropped at the bottleneck • Sending rate exceeds bottleneck b/w • Another user shares the bottleneck • Contention for shared resource