CS 414 – Multimedia Systems Design Lecture 29 – Buffer Management (Part 2)

Preview:

DESCRIPTION

CS 414 – Multimedia Systems Design Lecture 29 – Buffer Management (Part 2). Klara Nahrstedt Spring 2012. Administrative. MP2 posted MP2 Deadline – April 7, Saturday, 5pm. Covered Aspects of Multimedia. Audio/Video Presentation Playback. Image/Video Capture. Audio/Video - PowerPoint PPT Presentation

Citation preview

CS 414 - Spring 2012

CS 414 – Multimedia Systems Design Lecture 29 – Buffer Management (Part 2)

Klara Nahrstedt

Spring 2012

Administrative MP2 posted MP2 Deadline – April 7, Saturday, 5pm.

CS 414 - Spring 2012

Covered Aspects of Multimedia

Image/VideoCapture

MediaServerStorage

Transmission

CompressionProcessing

Audio/VideoPresentationPlaybackAudio/Video

Perception/ Playback

Audio InformationRepresentation

Transmission

AudioCapture

A/V Playback

Image/Video InformationRepresentation

CS 414 - Spring 2012

Multimedia Protocols: Layered Code

CS 414 - Spring 2012

Sampling/Encoding Streaming Application

Real-time Transport Protocol (Packetization/And Segmentation)

UDP

IP

Ethernet

Segmentation

Segmentation

Decoding/Playout Streaming Application

Real-time Transport Protocol (De-PacketizationAnd Re-assembly)

UDP

IP

Ethernet

Re-assembly

Reassembly

SENDER RECEIVER

NETWORK

S

T3T1

T2

Multicast

T1

T2T3

Multi-Traget

S T

Unicast

Sender/Receiver Curves for Transmission of Voice over Packet-switched network may cause packet losses

CS 414 - Spring 2012

ps(t)

bs(t) r(t)

pr(t)bytes

Lateloss

Protocol Requirements on Buffer Management (Summary) Protocol Requirement: Segmentation

Splitting of service data units (SDU) Identification of each split SDU

Protocol Requirement: Reassembly Linking memory to form one buffer

Protocol Requirement: Retransmission (in case of TCP) Maintain logical copy of buffer to store SDU for possible

retransmission

Protocol Requirement: Multicast Keep one buffer for all recipients and use multicast group

address

Protocol Requirement: Multi-target Keep one memory segment common to all buffers

CS 414 - Spring 2012

Buffer Management Techniquesfor Layered Code in Multimedia Protocol Stack Data Copying Offset Management Scatter-Gather

CS 414 - Spring 2012

Data Copying

CS 414 - Spring 2012

Transport Service Entity(UDP)

Copy data

Network Service Entity(IP)

Buffer for UDP Datagram

Kernel

User space

RTP StreamingService

Buffer for RTPProtocol Data Unit

Buffer for IP Datagram

Buffer Management System at Receiver

Copy data

Data Copying and Offset Management

CS 414 - Spring 2012

PCI1 Data

Data

PCI1 DataPCI2

App

RTP

UDP

DATA COPYING

1. app2. PCI1 added by RTP

3. PCI2 added by UDP

1. data2. PCI13. PCI2OFFSET MANAGMENT

Buffer Management: Assign as large buffer as data + all headers of the protocols require

Problems:???

Problems:???

Buffer Management: Copy data and PCIsbetween protocol layers

Scatter-Gather

CS 414 - Spring 2012

Scatter/GatherTable Structure

DATAData PTR1

PCI1

PCI1 PTR2

PCI2

PCI2 PTR3

Application Buffer Space

RTP BufferSpace

UDP BufferKernel Space

Problems: ???

Buffer Management: Establish scatter/gatherTable structure across all protocol layers to keep Track where payload (data) and control info (PCIs)Are located

Comparison

CS 414 - Spring 2012

Data Copying Offset Scatter/Gather

Memory BW High Low Low

CPU BW High Low Low

Memory Usage per Layer

Optimal for individual protocol layer because exact amount of space will be allocated

High for application protocol because it must allocate space more than it needs

Compromise, segments are sized depending on requirements

Are Protocol Requirements without copying satisfied?

NA No, segmentation needs copying

Mostly yes(one copy and segmentation must be done when data leaves node)

Client-Server Systems: Distributed Application Code

CS 414 - Spring 2012

Read encoded frames from VOD Disk

PacketizationProtocol Stack Processing

network

De-PacketizationProtocol Stack Processing

Decoderplayout

VOD Server

VOD Client

Client/Server Video-on-Demand System

CS 414 - Spring 2011

VOD Retrieval Transmission and Playout Curves

CS 414 - Spring 2012

time

bytes Retrieval curveFrom disk

SendingCurve fromVOD server

ReceivingCurve at VOD Client

Playout CurveAt VOD Client

Playoutbuffers

Playout Buffers Goal: face effects caused by Network delay, delay

jitter, packet loss on continuous media streamsBy using QoS-aware network technologies (RSVP,

DiffServ, ATM, …) not widely adapted

By using adaptive playout control techniques Face unpredictability of IP networks by compensating for

variable network delays and jitters experienced during the transmission of media packets

CS 414 - Spring 2012

Adaptive Playout Control Mechanisms Delay jitter is smoothed away by

Employing playout buffer at the receiverDynamically enqueueing packets into it

Playout buffer Delays received packets for some time to allow smooth

media packet playout rate, Absorbs negative effects introduced by delay jitterMust be adaptive since delay jitter on Internet may vary

significantly with time.

CS 414 - Spring 2012

Playout Delays

CS 414 - Spring 2012

Small Playout Delay Large Playout Delay

Buffer Management Techniques for VOD Client Consider time of buffer setup

Fixed Buffer TechniqueDynamic Buffer Technique

Consider size of bufferMinBufMaxBuf

CS 414 - Spring 2012

Buffer Management Strategies

Clients need buffers for VOD (Video-on-Demand) application to smooth out traffic jitters

Buffer management strategies balance bits in transit (buffer size and bits in channel)

Fixed Strategy (non-adaptive) and dynamic (adaptive)

CS 414 - Spring 2012

Buffer Management Strategies Fixed buffer strategy

Static buffer allocation during multimedia call setup phase

Static buffer allocation does not change during run-time

Dynamic buffer strategyElastic buffer allocation , i.e., allocate buffers during

multimedia call setup, but change them during run-time

CS 414 - Spring 2012

Buffering Strategies at VOD Client Minbuf - minimum buffering strategy

Minbuf minimizes buffering requirements at VOD client, but makes more demands on network (throughput and delay guarantees)

Maxbuf – maximum buffering strategyMaxbuf buffers more than one unit of information

and eases QoS guarantees demands on networkBuffering only up to a limit (Bufmax)

CS 414 - Spring 2012

Conclusion Need buffering consideration in layered code

of multimedia protocol stack Data copyingOffset managementScatter-gather

Need buffering consideration in distributed code of multimedia applications , e.g., Video-on-Demand (VOD) serviceBuffering at the VOD client sideSome buffering needed also at VOD Server side

CS 414 - Spring 2012

Recommended