Вы находитесь на странице: 1из 31

Distributed Multimedia

Systems
THOAI NAM
Faculty of Computer Science and Engineering
HCMC University of Technology

-1.1-

Multimedia applications

Video conf, digital TV, VoIP

Real-time
Video/audio data as continuous and time-based
Shared resources in Internet
Quality of service (QoS)
Quality of service management

Faculty of Computer Science and Engineering - HCMUT

-1.2-

A distributed multimedia system

Figure 20.1, Coulouris, Dollimore, Kindberg and Blair, Distributed Systems:


Concepts and Design Edn. 5 Pearson Education 2012

Faculty of Computer Science and Engineering - HCMUT

-1.3-

Characteristics of typical
multimedia streams
Data rate
(approximate)

Sample or frame
size
frequency

Telephone speech
64 kbps
8 bits
8000/sec
CD-quality sound
1.4 Mbps
16 bits 44,000/sec
Standard TV video
120 Mbps
up to 640 x 480
24/sec
(uncompressed)
pixels x 16 bits
Standard TV video
1.5 Mbps
variable
24/sec
(MPEG-1 compressed)
HDTV video
10003000 Mbps up to 1920 x 1080 2460/sec
(uncompressed)
pixels x 24 bits
HDTV video
1030 Mbps
variable 2460/sec
MPEG-2 compressed)
Figure 20.2, Coulouris, Dollimore, Kindberg and Blair, Distributed Systems:
Concepts and Design Edn. 5 Pearson Education 2012

Faculty of Computer Science and Engineering - HCMUT

-1.4-

QoS-less applications

Deployed in QoS-less, best-effort computing and


network environment
Web-based multimedia
Access to streams of audio and video published via the web: best-effort
quality
Not guarantee of performance
Youtube, Hulu and BBC iPlayer

Video-on-demand services
Video sent from the sources to the end users
Buffer used

Faculty of Computer Science and Engineering - HCMUT

-1.5-

Highly interactive applications

Internet telephony, video conference, a music rehearsal


& performance facility enabling musicians at different
locations to perform in an ensemble
Requirements:

Low-latency communication
Synchronous distributed state
Media synchronization
External synchronization

Faculty of Computer Science and Engineering - HCMUT

-1.6-

Typical infrastructure components


for multimedia applications

Figure 20.3, Coulouris, Dollimore, Kindberg and Blair, Distributed Systems:


Concepts and Design Edn. 5 Pearson Education 2012

Faculty of Computer Science and Engineering - HCMUT

-1.7-

QoS specifications for components


of applications in Fig 20.3
Component
Camera
A Codec
B Mixer

Bandwidth

Latency

Loss rate Resources required

Out:

10 frames/sec, raw video


640x480x16 bits

Zero

In:
Out:
In:

10 frames/sec, raw video Interactive Low


MPEG-1 stream
2 x 44 kbps audio
Interactive Very low

10 ms CPU each 100 ms;


10 Mbytes RAM
1 ms CPU each 100 ms;

Out:
In:
Out:
In/Out:

1 x 44 kbps audio
1 Mbytes RAM
H Window
various
Interactive Low
5 ms CPU each 100 ms;
system
50 frame/sec framebuffer
5 Mbytes RAM
K Network
MPEG-1 stream, approx. Interactive Low
1.5 Mbps, low-loss
connection
1.5 Mbps
stream protocol
L Network
In/Out: Audio 44 kbps
Interactive Very low 44 kbps, very low-loss
connection
stream protocol
Figure 20.4, Coulouris, Dollimore, Kindberg and Blair, Distributed Systems:
Concepts and Design Edn. 5 Pearson Education 2012

Faculty of Computer Science and Engineering - HCMUT

-1.8-

QoS management

Multimedia applications compete for resources


In computers: processor cycles, bus cycles, buffer capacity
In the networks: physical transmission links, switches, gateways

Current solutions:
Round-robin or other scheduling scheme that shares the processing
resources on a best-effort basis among all of the tasks currently competing
for the central processor
Ethernet: manages a shared transmission medium in a best-effort manner.
Collisions are likely to occur when the network is heavily loaded, and this
scheme cannot provide any guarantees regarding the bandwidth or latency
in such situations

The management and allocation of resources to provide such


guarantees is referred to as quality of service management
Faculty of Computer Science and Engineering - HCMUT

-1.9-

The QoS managers task

Figure 20.5, Coulouris, Dollimore, Kindberg and Blair, Distributed Systems:


Concepts and Design Edn. 5 Pearson Education 2012

Faculty of Computer Science and Engineering - HCMUT

-1.10-

Quality of service negotiation

Bandwidth
The bandwidth of a multimedia stream or component is the rate at
which data flows through it

Latency
Latency is the time required for an individual data element to move
through a stream from the source to the destination

Loss rate
Some apps accept a certain rate of data loss i.e., dropped video frames or
audio samples
The acceptable ratios are usually kept low seldom more than 1% and
much lower for quality-critical applications.

Faculty of Computer Science and Engineering - HCMUT

-1.11-

Burstiness

Consider three streams of 1 Mbps:


One stream transfers a single frame of 1 Mbit every second
The second is an asynchronous stream of computer-generated animation
elements with an average bandwidth of 1 Mbps
The third sends a 100-bit sound sample every microsecond.
Whereas all three streams require the same bandwidth, their traffic patterns
are very different

The burst parameter specifies the maximum number of media


elements that may arrive early
That is, before they should arrive according to the regular arrival rate

Faculty of Computer Science and Engineering - HCMUT

-1.12-

Model of linear-bounded arrival


processes(LBAP)

The model of linear-bounded arrival processes (LBAP) used in


Anderson [1993] defines the maximum number of messages
in a stream during any time interval t as Rt+ B, where R is the
rate and B is the maximum size of burst

Faculty of Computer Science and Engineering - HCMUT

-1.13-

Traffic shaping algorithms


(a) Leaky bucket

(b) Token bucket

Token generator

Figure 20.6, Coulouris, Dollimore, Kindberg and Blair, Distributed Systems:


Concepts and Design Edn. 5 Pearson Education 2012

Faculty of Computer Science and Engineering - HCMUT

-1.14-

The leaky bucket algorithm

Any stream can be regulated by inserting a buffer at the


source and by defining a method by which data elements
leave the buffer
The bucket can be filled arbitrarily with water until it is full;
through a leak at the bottom of the bucket water will flow
continuously
ensures that a stream will never flow with a rate higher than
R. The size of the buffer B defines the maximum burst a
stream can incur without losing elements. B also bounds the
time for which an element will remain in the bucket

Faculty of Computer Science and Engineering - HCMUT

-1.15-

The token bucket algorithm

The leaky bucket algorithm completely eliminates bursts. Such elimination is


not always necessary as long as bandwidth is bounded over any time interval.
The token bucket algorithm achieves this while allowing larger bursts to occur
when a stream has been idle for a while

Data are generated at a fixed rate, R. They are collected in a


bucket of size B
Data of size S can be sent only if at least S tokens are in the
bucket. The send process then removes these S tokens
ensures that over any interval t the amount of data sent is
not larger than Rt+ B
Faculty of Computer Science and Engineering - HCMUT

-1.16-

The RFC 1363 Flow Spec (1)


Protocol version
Maximum transmission unit
Bandwidth:

Token bucket rate


Token bucket size
Maximum transmission rate

Delay:

Minimum delay noticed


Maximum delay variation
Loss sensitivity

Loss:

Burst loss sensitivity


Loss interval
Quality of guarantee

Figure 20.7, Coulouris, Dollimore, Kindberg and Blair, Distributed Systems:


Concepts and Design Edn. 5 Pearson Education 2012

Faculty of Computer Science and Engineering - HCMUT

-1.17-

The RFC 1363 Flow Spec (2)

The maximum transmission unit and maximum transmission rate


determine the maximum bandwidth required by the stream
The token bucket size and rate determine the burstiness of the
stream
The delay characteristics are specified by the minimum delay that
an application can notice (since we wish to avoid over
optimization for short delays) and the maximum jitter it can
accept
The loss characteristics are defined by the total number of losses
acceptable over a certain interval and the maximum number of
consecutive losses acceptable

Faculty of Computer Science and Engineering - HCMUT

-1.18-

Resource management

Fair scheduling
Round-robin scheduling to all streams in the same class
Fair queuing: packet-by-packet, bit-per-bit
Weighted fair queuing

Real-time scheduling
Traditional real-time scheduling methods suit the model of regular
continuous multimedia streams very well
EDF scheduler uses a deadline that is associated with each of its work items
to determine the next item to be processed: the item with the earliest
deadline goes first

Faculty of Computer Science and Engineering - HCMUT

-1.19-

Stream adaption (1)

Scaling: adapt a stream to the bandwidth available in the system before it


enters a bottleneck resource in order to resolve contention
Temporal scaling: Reduces the resolution of the video stream in the time
domain by decreasing the number of video frames transmitted within an
interval
Spatial scaling: Reduces the number of pixels of each image in a video
stream
Frequency scaling: Modifies the compression algorithm applied to an image
Amplitudinal scaling: Reduces the colour depths for each image pixel
Colour-space scaling: Reduces the number of entries in the colour space.
One way to realize colour-space scaling is to switch from colour to greyscale
presentation

Faculty of Computer Science and Engineering - HCMUT

-1.20-

Stream adaption (2)

Filtering
As scaling modifies a stream at the source, it is not always suitable for
applications that involve several receivers
Filtering is a method that provides the best possible QoS to each target by
applying scaling at each relevant node on the path from the source to the
target
RSVP [Zhang et al. 1993] is an example of a QoS negotiation protocol that
supports filtering

Faculty of Computer Science and Engineering - HCMUT

-1.21-

Filtering

Source

Targets

High bandwidth
Medium bandwidth
Low bandwidth
Figure 20.8, Coulouris, Dollimore, Kindberg and Blair, Distributed Systems:
Concepts and Design Edn. 5 Pearson Education 2012

Faculty of Computer Science and Engineering - HCMUT

-1.22-

The Tiger video file server

Tiger video file server developed at the Microsoft


Research Labs [Bolosky et al.1996]
Video-on-demand for a large number of users
Quality of service
Video streams must be supplied at a constant rate with a maximum jitter that
is determined by the (assumed small) amount of buffering available at the
clients and a very low loss rate

Scalable and distributed: 10.000 clients


Low-cost hardware
Fault tolerance
Faculty of Computer Science and Engineering - HCMUT

-1.23-

Tiger video file server hardware


configuration
Controller
low-bandwidth network

n+1

Cub 0

n+2

Cub 1

n+3

Cub 2

n+4

Cub 3

2n+1

Cub n

high-bandwidth

ATM switching network

video distribution to clients

Start/Stop
requests from clients

Figure 20.9, Coulouris, Dollimore, Kindberg and Blair, Distributed Systems:


Concepts and Design Edn. 5 Pearson Education 2012

Faculty of Computer Science and Engineering - HCMUT

-1.24-

Tiger schedule

block service
time t

1
block play time T

slot 0

slot 1

slot 2

slot 3

slot 4

slot 5

slot 6

slot 7

viewer 4

free

free

viewer 0

viewer 3

viewer 2

free

viewer 1

state

state

state

state

state

Figure 20.10, Coulouris, Dollimore, Kindberg and Blair, Distributed Systems:


Concepts and Design Edn. 5 Pearson Education 2012

Faculty of Computer Science and Engineering - HCMUT

-1.25-

BitTorrent

BitTorrent [www.bittorrent.com] is a popular peer-topeer file-sharing application designed particularly for


downloading large files (including video files)
Splitting of files into fixed-sized chunks and the
subsequent availability of chunks at various sites across
the peer-to-peer network
Clients can then download a number of chunks in
parallel from different sites

Faculty of Computer Science and Engineering - HCMUT

-1.26-

A .torrent file

The name and length of the file


The location of a tracker(specified as a URL), which is a
centralized server that manages downloads of that
particular file
A checksum associated with each chunk, generated using
the SHA-1 hashing algorithm, that enables content to be
verified following download

Faculty of Computer Science and Engineering - HCMUT

-1.27-

The incentive mechanism

The tit-for-tat mechanism [Cohen 2003]


Preference to downloading peers who have previously
or who are currently uploading to that site
Peers to behave as good citizens
A given peer supports downloading from n simultaneous
peers by unchoking these peers

Faculty of Computer Science and Engineering - HCMUT

-1.28-

BitTorrent Terminology

Figure 20.11, Coulouris, Dollimore, Kindberg and Blair, Distributed Systems:


Concepts and Design Edn. 5 Pearson Education 2012

Faculty of Computer Science and Engineering - HCMUT

-1.29-

End System Multicast: an approach


to real-time video streaming

Figure 20.12, Coulouris, Dollimore, Kindberg and Blair, Distributed Systems:


Concepts and Design Edn. 5 Pearson Education 2012

Faculty of Computer Science and Engineering - HCMUT

-1.30-

An example tree in ESM

Figure 20.13, Coulouris, Dollimore, Kindberg and Blair, Distributed Systems:


Concepts and Design Edn. 5 Pearson Education 2012

Faculty of Computer Science and Engineering - HCMUT

-1.31-

Вам также может понравиться