1 Chapter 14 Sustainable Logistics and Supply Chain Systems Professor : Lyu Ph.D Student : Mira.
© Chinese University, CSE Dept. Distributed Systems / 11 - 1 Distributed Systems Topic 11:...
-
Upload
elizabeth-ross -
Category
Documents
-
view
219 -
download
1
Transcript of © Chinese University, CSE Dept. Distributed Systems / 11 - 1 Distributed Systems Topic 11:...
© Chinese University, CSE Dept. Distributed Systems / 11 - 1
Distributed Systems
Topic 11:
Distributed Multimedia Systems
Dr. Michael R. LyuComputer Science & Engineering Department
The Chinese University of Hong Kong
© Chinese University, CSE Dept. Distributed Systems / 11 - 2
1 Outline
1. Introduction
2. Characters of multimedia data
3. Quality of service management
4. Resource management
5. Stream adaptation
6. Summary
© Chinese University, CSE Dept. Distributed Systems / 11 - 3
1 Introduction
Media:– The term media refers to the storage,
transmission, interchange, presentation, representation and perception of different information types, such as text, graphics, voice, audio and video.
Multimedia– The term multimedia is to denote the property of
handling a variety of media representation in an integrated manner.
© Chinese University, CSE Dept. Distributed Systems / 11 - 4
1 Introduction
Most multimedia is inherently time-based – the arrival time and arrival order of data packets is important
The Internet guarantees neither when transmitting data
We don’t just want interactive multimedia over our networks… we want it to be reliable and high-quality
A distributed multimedia system can come to the rescue
© Chinese University, CSE Dept. Distributed Systems / 11 - 5
1 A Distributed Multimedia System
Wide area gateway Videoserver
DigitalTV/radioserver
Video cameraand mike
Local network Local network
© Chinese University, CSE Dept. Distributed Systems / 11 - 6
1.1 Multimedia in A Mobile Environment
*
© Chinese University, CSE Dept. Distributed Systems / 11 - 7
1.1 History
60s-70s: Distributed computing research with earliest networks
80s: Compact disc, personal computer explosion
80s-90s: Distributed multimedia system research (video conferencing, et al)
90s: Current prevalent paradigm (quality of service management)
© Chinese University, CSE Dept. Distributed Systems / 11 - 8
1.1 Multimedia Application Samples
Web-based multimedia: It provides best-effort access to streams of audio and video data published via web.
Network phone and audio conferencing: It has relatively low bandwidth requirements, especially when efficient compression techniques are used
Video-on-demand services: These supply video information in digital form, retrieving the data from large online storage systems and delivering them to the end-user’s display
© Chinese University, CSE Dept. Distributed Systems / 11 - 9
1.2 The Window of Scarcity
When dealing with large audio and video streams, many systems are constrained in the quantity and quality of streams they can support.
This situation has need depicted as the window of scarcity.
1980 1990
remotelogin
networkfile access
high-qualityaudio
interactivevideo
insufficientresources
scarceresources
abundantresources
2000
The window of scarcity for computing and communication resources
© Chinese University, CSE Dept. Distributed Systems / 11 - 10
2 Characteristics of Multimedia Applications
Large quantities of continuous data Timely and smooth delivery is critical Interactive multimedia applications require low round-trip
delays Need to co-exist with other applications Reconfiguration is a common occurrence Resources required:
– Processor cycles in workstations and servers– Network bandwidth (+ latency)– Dedicated memory– Disk bandwidth (for stored media)
© Chinese University, CSE Dept. Distributed Systems / 11 - 11
2 Characteristics of Multimedia Streams
Data rate(approximate)
Sample or frame frequency size
Telephone speech 64 kbps 8 bits 8000/secCD-quality sound 1.4 Mbps 16 bits 44,000/secStandard TV video(uncompressed)
120 Mbps up to 640 x 480pixels x 16 bits
24/sec
Standard TV video (MPEG-1 compressed)
1.5 Mbps variable 24/sec
HDTV video(uncompressed)
1000–3000 Mbps up to 1920 x 1080pixels x 24 bits
24–60/sec
HDTV videoMPEG-2 compressed)
10–30 Mbps variable 24–60/sec
© Chinese University, CSE Dept. Distributed Systems / 11 - 12
3 Quality of Service (QoS) Management
Simplicity in and of itself: We want and need high quality, reliable, interactive multimedia
The general Internet structure is not sufficient to accomplish this
A distributed multimedia system will add protocols and architectures on top of the Internet (or LAN) to guarantee quality levels, thereby satisfying our need
© Chinese University, CSE Dept. Distributed Systems / 11 - 13
3 Infrastructure Components for Multimedia Applications
Microphones
Camera
Screen
Window system
CodecD
BMixer
PC/workstation PC/workstation
CVideostore
Networkconnections
K
L
M
: multimedia stream
CodecA G
Codec
H
Window system
White boxes represent media processing components, many of which are implemented in software, including:codec: coding/decoding filter
mixer: sound-mixing component
Video file system
© Chinese University, CSE Dept. Distributed Systems / 11 - 14
3 QoS Specifications for Application Components
Component Bandwidth Latency Loss rate Resources required
Camera Out: 10 frames/sec, raw video640x480x16 bits
Zero
A Codec In:Out:
10 frames/sec, raw videoMPEG-1 stream
Interactive Low 10 ms CPU each 100 ms;10 Mbytes RAM
B Mixer In:Out:
2 44 kbps audio1 44 kbps audio
Interactive Very low 1 ms CPU each 100 ms;1 Mbytes RAM
H Windowsystem
In:Out:
various50 frame/sec framebuffer
Interactive Low 5 ms CPU each 100 ms; 5 Mbytes RAM
K Networkconnection
In/Out: MPEG-1 stream, approx.1.5 Mbps
Interactive Low 1.5 Mbps, low-lossstream protocol
L Networkconnection
In/Out: Audio 44 kbps Interactive Very low 44 kbps, very low-lossstream protocol
© Chinese University, CSE Dept. Distributed Systems / 11 - 15
3 The QoS Manager’s Task
Application components specify their QoS requirements to QoS manager
Yes No
Yes No
Flow spec.
Resource contract
Admission control QoS negotiation
QoS manager evaluates new requirementsagainst the available resources.
Sufficient?
Reserve the requested resources
Allow application to proceed
Application runs with resources as per resource contract
Negotiate reduced resource provision with application.Agreement?
Do not allow application to proceed
Application notifies QoS manager of increased resource requirements
© Chinese University, CSE Dept. Distributed Systems / 11 - 16
3.1 Quality of Services Negotiation
Bandwidth: data rate through a component Latency: time needed for a packet to travel
end to end Jitter: the rate of change of latency Loss rate: acceptable drop-frame ratio Quality of service management: negotiation
and allocation of computing resources
© Chinese University, CSE Dept. Distributed Systems / 11 - 17
3.1.1 Specifying QoS Parameters
The values of QoS parameters can be stated explicitly or implicitly
Bandwidth: Most video compression techniques produce a stream of frames of different sizes.
Latency: Some timing requirements in multimedia result from the stream itself.
Loss rate: Loss rate is the most difficult QoS parameter to specify.
© Chinese University, CSE Dept. Distributed Systems / 11 - 18
3.1.2 Traffic Shaping Algorithms
Traffic shaping: using buffers at source and destination to smooth data flow
Token generator
(a) Leaky bucket (b) Token bucket
© Chinese University, CSE Dept. Distributed Systems / 11 - 19
3.1.3 Flow Specification
Flow specification: explicit representation of required resources
Protocol version
Maximum transmission unit
Token bucket rate
Token bucket size
Maximum transmission rate
Minimum delay noticed
Maximum delay variation
Loss sensitivity
Burst loss sensitivity
Loss interval
Quality of guarantee
Bandwidth:
Delay:
Loss:
The RFC 1363 Flow Spec
© Chinese University, CSE Dept. Distributed Systems / 11 - 20
3.2 Admission Control
Admission control: allowing or denying client requests based on available resources– Bandwidth reservation
» A common way to ensure QoS level for multimedia stream is to reserve some portion of resource bandwidth for its exclusive use.
– Statistical multiplexing» It is based on the hypothesis that for large number of
streams the required aggregate bandwidth remains nearly constant regardless of the bandwidth of individual streams.
» Multimedia traffic may not obey this hypothesis.
© Chinese University, CSE Dept. Distributed Systems / 11 - 21
3.3 Overall Structure
1: Resources provide flow spec to main QoS manager through local QoS managers
2: Main QoS ready to reserve resources
3: Client send request to main QoS
4: Main QoS decides if client can be served based on available resources
5: If so, main QoS tells local QoS to allocate resources (if not, client is rejected)
6: Service begins
7: Main QoS and local QoS monitor resource usage / quality, adjust allocated resources if necessary
8: Return to step 4 if new client connects
9: Service ends, resources are freed
Controller Client
Resource Resource Resource
QoS QoS QoS
Main QoS
Network Transmission LineClient
© Chinese University, CSE Dept. Distributed Systems / 11 - 22
3.4 QoS Summary
Serving multimedia requires strict resource control to maintain quality
Resources consist of bandwidth, latency, and loss rate, among others
Resource components declare the resources they need in flow specifications
Quality of service managers negotiate and reserve resources to guarantee quality
Resource + flow spec + QoS manager + transmission lines = distributed multimedia system
© Chinese University, CSE Dept. Distributed Systems / 11 - 23
4 Resource Management System
Provide the means to offer QoS to multimedia applications
Addressing issues– QoS Calculation
» To check whether the QoS demands of an application can be satisfied
– Resource Reservation» To reserve an amount of resources according to the given QoS
guarantee
– Resource Scheduling» To enforce that the given QoS guarantees are satisfied by
appropriate scheduling of resource access
© Chinese University, CSE Dept. Distributed Systems / 11 - 24
4.1 Resources
Resources– All the entities which participate in the overall task of the
application
– Classification (active vs. passive; exclusive vs. shared; single vs. multiple)
– Scheduled, Assigned for QoS
Resource Capacity– Availability for application when needed
– Be at least as large as the requirements for QoS
– Depending on the mechanisms for QoS calculation, resource reservation and scheduling
© Chinese University, CSE Dept. Distributed Systems / 11 - 25
4.2 Reservation Policies
Pessimistic approach– The resource capacities are reserved for the worst case– Advantage: avoid conflicts, offer deterministic guarantees– Disadvantage: high cost, underutilization of resources
Optimistic approach– Resources are reserved on average workload– Advantage : cheaper– Disadvantage : temporal resource conflicts
Resource Reservation Protocol (RSVP)– To exchange and negotiate QoS requirements– Receiver-oriented approach. Receivers are responsible for
initiating and keeping the reservation active.
© Chinese University, CSE Dept. Distributed Systems / 11 - 26
4.3 Resource Scheduling
Scheduling of resources to meet QoS
requirements
Fair scheduling: allow all processes some
portion of the resources based on fairness
Real-time scheduling: all to meet real-time
requirements (with deadlines)
– Regular continuous multimedia streams
– Bursty real-time traffic
© Chinese University, CSE Dept. Distributed Systems / 11 - 27
4.4 Resource Management Phase
– Phase 1: the set-up or QoS negotiation phase» Applications specify their QoS requirements to be used for
the admission test and the QoS calculation
– Phase 2: the transmission or QoS enforcement phase» Resources are scheduled with respect to the given QoS
guarantees.» Schedulers handle time-critical multimedia streams prior to
time-independent data Resource Monitoring Adaptation
– Phase 3» After the transmission has finished, the allocated resources
must be released.
© Chinese University, CSE Dept. Distributed Systems / 11 - 28
4.5 Resource Management System Structure
Contain components used in the enforcement phase
Consist of System Resource Manager and Resource Managers– System Resource Manager
» Control the single ‘Resource Managers’
– Resource Manager» Contain algorithms for admission control and policy control» Keep information about the characteristics of the resource and
its reservations» CPU resource manager, Memory resource manager and so on
Resource management schemes: static vs. dynamic
© Chinese University, CSE Dept. Distributed Systems / 11 - 29
4.6 Static Resource Management Scheme
Perform QoS calculation and resource reservation during the setup time
Schedule the resource in such a way that processing deadlines are met
Advantage – Offer strong guarantees for the application’s performance– Provide reliable QoS
Drawback– Difficult to determine the amount of resource needed in advance– Not easily cope with a change in the set of running applications
during the run-time of an application– Rely on total knowledge of the set of available resources
© Chinese University, CSE Dept. Distributed Systems / 11 - 30
4.7 Dynamic Resource Management Scheme
Renegotiate the resource as changes of requirements at run-time
The goal– Support of variable-bit rate streams – Adaptation to changes in the set of applications to be served– Allowing for a dynamic change in the relative priority of applications– Serving more applications concurrently – Handling of changes in resource availability
Consisting components– Resource monitor– System resource manager: responsible for the negotiations
© Chinese University, CSE Dept. Distributed Systems / 11 - 31
4.7 Dynamic Resource Management Scheme
Applications– Receive adaptation notifications
– Decide how to change their behavior to adapt their resource demands
– Monitor the QoS and start a QoS renegotiation
Drawback– Not able to provide guaranteed, constant QoS
© Chinese University, CSE Dept. Distributed Systems / 11 - 32
5 Stream Adaptation: Scaling
Scaling reduces flow rate at source– Temporal scaling: skip frames or audio samples– Spatial scaling: reduce frame size or audio
sample quality– Frequency scaling: modify image compression
algorithm without much loss of quality.– Color-space scaling: reduce the number of entries
in color space.
© Chinese University, CSE Dept. Distributed Systems / 11 - 33
5 Stream Adaptation: Filtering
Filtering reduces flow at intermediate points– Filtering provides best possible QoS to each
target by applying scaling at each relevant node on the path from the source to the target.
– RSVP is a QoS negotiation protocol that negotiates the rate at each intermediate node, working from targets to the source.
© Chinese University, CSE Dept. Distributed Systems / 11 - 34
5 Stream Adaptation: Filtering
SourceTargets
High bandwidth
Medium bandwidth
Low bandwidth
© Chinese University, CSE Dept. Distributed Systems / 11 - 35
5.1 A Sample Wavelet Video Filtering
Basic Concept:
© Chinese University, CSE Dept. Distributed Systems / 11 - 36
5.1 Wavelet Video Filtering
Video frames are encoded into packets with “priority label”
QoS Filter drops the least important packets in case of insufficient bandwidth
This maximizes visual quality with resource constraints
© Chinese University, CSE Dept. Distributed Systems / 11 - 37
6 Summary
Multimedia applications and systems require new system mechanisms to handle large volumes of time-dependent data in real time (media streams).
The most important mechanism is QoS management, which includes resource negotiation, admission control, resource reservation and resource management.
Negotiation and admission control ensure that resources are not over-allocated, resource management ensures that admitted tasks receive the resources they were allocated.
Read textbook Chapter 20.