Klara Nahrstedt Spring 2014: CS 414 - Multimedia Systems Design - Queue Management

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 23

CS 414 Multimedia Systems Design Lecture 21 Queue Management

Klara Nahrstedt Spring 2014


CS 414 - Spring 2014

Covered Aspects of Multimedia


Image/Video Capture
Audio/Video Perception/ Playback Audio/Video Presentation Playback

Image/Video Information Representation

Transmission
Audio Capture Compression Processing

Transmission

Audio Information Representation

Media Server Storage

A/V Playback

CS 414 - Spring 2014

TRAFFIC SHAPING AND POLICING


CS 414 - Spring 2014

Isochronous Traffic Shaping (Simple Leaky Bucket Traffic Shaper)

Developed by Jon Turner, 1986 (Washington University, St. Louis)

CS 414 - Spring 2014

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) Regulators 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) Regulators 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<):
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 lets consider B tokens in bucket;
Token

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


Token Bucket TB permits burstiness, but bounds it Simple Leaky Bucket LB forces bursty traffic to smooth out

Burstiness is bounded as follows: - Flow never sends more than +* tokens worth of data in interval and - Long-term transmission rate will not exceed
TB does not have discard or priority policy TB more flexible

Flow never sends faster than worth of packets per second

LB has priority policy LB is rigid

TB is easy to implement -Each flow needs counter to count tokens, - each flow needs timer to determine when to add new tokens to the counter

LB is easy to implement

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)
Work-conserving schemes Non-work-conserving schemes

Fair Queuing

Jitter Earliest-Due-Date

Virtual Clock
Delay Earliest-Due-Data

Stop-and-Go
Hierarchical Round-Robin

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 t0 over 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+ x between [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 32bit 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

You might also like