230 likes | 236 Views
This lecture explores queue management and rate control mechanisms in multimedia systems, including traffic shaping, token bucket, weighted fair queuing, and error control.
E N D
CS 414 – Multimedia Systems DesignLecture 21 – Queue Management Klara Nahrstedt Spring 2014 CS 414 - Spring 2014
Covered Aspects of Multimedia Audio/Video Presentation Playback Image/Video Capture Audio/Video Perception/ Playback Image/Video Information Representation Transmission Transmission Compression Processing Audio Capture Media Server Storage Audio Information Representation A/V Playback CS 414 - Spring 2014
Traffic shaping and policing CS 414 - Spring 2014
Isochronous Traffic Shaping(Simple Leaky Bucket Traffic Shaper) CS 414 - Spring 2014 Developed by Jon Turner, 1986 (Washington University, St. Louis)
Example • Consider for audio flow, size of the bucket • β = 16 Kbytes • Packet size = 1 Kbytes (one can accumulate burst up to 16 packets in the bucket) • Regulator’s rate ρ = 8 packets per second, or 8KBps or 64Kbps • Consider video flow, size of bucket • β = 400 Kbytes • Packet size = 40 Kbytes (burst of 10 packets) • Regulator’s rate ρ = 5 packets per second, 200 KBps, 1600Kbps CS 414 - Spring 2014
Limitations of Isochronous Traffic Shaping The range of behaviors is limited to fixed rate flows Variable flows must request data rate equal to peak rate which is wasteful CS 414 - Spring 2014
Shaping Bursty Traffic Patterns (Token Bucket) CS 414 - Spring 2014
Token Bucket • The effect of TB is different than Leaky Bucket (LB) • Consider sending packet of size b tokens (b<β): • Token bucket is full – packet is sent and b tokens are removed from bucket • Token bucket is empty – packet must wait until b tokens drip into bucket, at which time it is sent • Bucket is partially full – let’s consider B tokens in bucket; • if b ≤ B then packet is sent immediately, • Else wait for remaining b-B tokens before being sent. CS 414 - Spring 2014
Comparison between TB and LB CS 414 - Spring 2014
Queuing , Queue management and rate control CS 414 - Spring 2014
Rate Control Queueing Mechanisms and Policies Multimedia networks use rate-based mechanisms (conventional networks use window-based flow control and FIFO) CS 414 - Spring 2014
Weighted Fair Queuing CS 414 - Spring 2014
Weighted Fair Queuing CS 414 - Spring 2014
WFQ vs FQ • Both in WFQ and FQ, each data flow has a separate FIFO queue. • In FQ, with a link data rate of R, at any given time the N active data flows (the ones with non-empty queues) are serviced simultaneously, each at an average data rate of R / N. • Since each data flow has its own queue, an ill-behaved flow (who has sent larger packets or more packets per second than the others since it became active) will only punish itself and not other sessions. • WFQ allows different sessions to have different service shares. If N data flows currently are active, with weights w1,w2...wN, data flow number i will achieve an average data rate of R * wi/(w1+w2+…+wn) CS 414 - Spring 2014
WFQ and Jitter • WFQ guarantees packet delay less than a given value D, but as long as delay is within bound it does not guarantee what the delay will be • Example: send packet at time t0over a path whose maximum delay is D (note that each path has some minimal delay d) • WFQ guarantees that packet arrives no sooner than t0+d, but packets can arrive any time t0+ xbetween [t0+d, t0+D] . • x is jitter CS 414 - Spring 2014
Class-based WFQ PQ – Priority Queue CS 414 - Spring 2014
Error Control: Avoidance, detection, Correction CS 414 - Spring 2014
Congestion Avoidance via Random Early Drop(Active Queue Management) RED = Random Early Drop Refined RED based on IP packet preference is Weighted RED (WRED) CS 414 - Spring 2014
Error Detection • Ability to detect the presence of errors caused by noise or other impairments during transmission from sender to receiver • Traditional mechanisms: check-summing, PDU sequencing • Checksum of a message is an arithmetic sum of message code words of a certain word length (e.g., byte) • CRC – Cyclic Redundancy Check – function that takes as input a data stream of any length and produces as output a value (commonly a 32-bit integer) – can be used as a checksum to detect accidental alteration of data during transmission or storage • Multimedia mechanisms: byte error detection at application PDU, time detection CS 414 - Spring 2014
Design of Error Correction Codes • Automatic repeat-request (ARQ) • Transmitter sends the data and also an error detection code, which the receiver uses to check for errors, and requests retransmission for erroneous data • The receiver sends ACK (acknowledgement of correctly received data) • Forward Error Correction (FEC) • Transmitted encodes the data with an error-correcting code (ECC) and sends the coded msg. No ACK exists. CS 414 - Spring 2014
Error Control • Error Correction • Traditional mechanisms: retransmission using acknowledgement schemes, window-based flow control • Multimedia mechanisms: • Go-back-N Retransmission • Selective retransmission • Partially reliable streams • Forward error correction • Priority channel coding • Slack Automatic Repeat Request CS 414 - Spring 2014
Go-back-N Retransmission CS 414 - Spring 2014
Conclusion • Establishment Phase • Negotiation, Translation • Admission, Reservation • Transmission Phase • Classification, Marking, Policing - Traffic Shaping • Isochronous Traffic Shaping • Shaping Bursty Traffic • Queueing Mechanisms and Policies • Rate Control • Error Control • Next: Case Studies of Multimedia Protocols CS 414 - Spring 2014