Sem 7

QoS and Resource Management

Deck QoS and Resource Management (Unit 2, text book T1 chapters 2.1 to 2.3 and 4.1). Scaling versus reservation, real-time deadlines, QoS layering and specification, service classes (guaranteed, predictable, best effort), resource management and media server pull and push models.

Handling multimedia streamsSearch on YouTube

There are two major approaches to handle multimedia streams in computing and communication environments.

ApproachIdeaExample
Scaling and adaptationAdjust the media quality of the stream to the resources available. The system adapts in real time to changes in the environment to keep playback smooth.Adaptive Bit Rate (ABR) video playback: Netflix, YouTube
Resource reservationReserve specific resources (bandwidth, processing power, memory) in advance. The required resources are always available, so interruptions and quality loss are less likely.VoIP systems: Skype, WhatsApp, Zoom

Need: QoS and resource management concepts are crucial to meet the heterogeneity of requirements that different distributed multimedia applications bring.

Requirements and constraintsSearch on YouTube

(Text book T1, chapter 2.1.) To be accepted, multimedia systems must satisfy very heterogeneous requirements under different conditions and constraints of their run-time computing and communication environment. The central requirement is real time with deadlines.

Real timeSearch on YouTube

The German National Institute for Standardization (DIN, similar to ANSI) defines it:

A real-time process is a process which delivers the results of the processing in a given time-span.

It further says:

  • Real-time systems must meet strict timing deadlines to operate correctly.
  • The system must handle both deterministic and stochastic events, and enforce both internal and external time constraints.

Live-streamed video. Playback at a fixed frame rate is a deterministic event. Network delay from congestion causes buffering or stuttering, which are stochastic events. The streaming system must absorb the stochastic events and still give smooth viewing.

DeadlinesSearch on YouTube

A deadline is the latest acceptable time limit for presenting a processing or communication result. It marks the border between normal (correct) and anomalous (failing) behaviour.

Soft deadlineHard deadline
MeaningFlexible; can be missed without catastrophic consequencesMust never be violated
When usedExact timing is not critical and minor deviations are toleratedSet by the physical characteristics of real-time processes
ConditionAcceptable as long as not too many deadlines are missed and deadlines are not missed by muchA violation is a system failure

Characteristics of real-time systemsSearch on YouTube

CharacteristicMeaning
Predictably fast responseTo time-critical events, with accurate timing information
High degree of schedulabilityRefers to resource utilization and meeting deadlines
Stability under transient overloadCritical tasks still get processed when the system is overloaded

Real-time requirements on multimedia systemsSearch on YouTube

Each unit of audio or video must be presented by a well-determined deadline. To meet the timing of continuous media, scheduling techniques are used for every resource on the path: CPU, main memory, storage, I/O devices, networks.

  • Fault tolerance: less strict than traditional real-time systems. A short failure has little impact. Exceptions exist, such as remote surgery.
  • Missing a deadline: an occasional miss is barely visible in video (one lost frame). Audio is different: human ears are more sensitive to small glitches.
  • Periodic sampling: all continuous media signals are sampled periodically. This timing must be synchronized through the whole system.
  • Bandwidth demand: not stringent. It is negotiable, because most streaming services use ABR.
  • Multimedia systems must also meet the requirements of external devices, for example an orchestra.

A favourite contrast: video tolerates a dropped frame, audio does not. Explain it with the sensitivity of the human ear.

ConstraintsSearch on YouTube

  • Data movement constraint
  • Segmentation and reassembly
  • Error-recovery mechanisms

Concepts of QoSSearch on YouTube

(Text book T1, chapter 2.2.) Quality of Service is the defined and controlled behaviour of a service, expressed through quantitative, measurable parameters. The ISO standard defines QoS as a concept for specifying how "good" the offered networking services are.

The key: because requirements are heterogeneous, services in multimedia systems must be parameterized.

QoS layeringSearch on YouTube

Traditional QoS was defined for the network layer and later extended to the transport layer. End-to-end quality also depends on other areas, so QoS is defined in a layered architecture.

LayerMeaningParameters
Perceptual QoSSubjective quality as perceived by the userVisual quality (resolution, colour, artifacts), audio quality (clarity, distortion), overall experience (smoothness, responsiveness)
Application QoSObjective quality provided by an applicationLatency, jitter, bandwidth, packet loss, error rate, throughput
System QoSQuality provided by the underlying systemProcessing power, memory, storage, device compatibility
Device QoSQuality provided by individual devicesDisplay resolution, audio quality, I/O speed, battery life
Network QoSQuality provided by the network infrastructureBandwidth, latency, jitter, packet loss, error rate, reliability

P A S D N: "Please Ask System Developers Now": Perceptual, Application, System, Device, Network.

Service objectsSearch on YouTube

Service objects are the entities on which services are performed.

  • Media sources: the original source of the content (a video file).
  • Connections: communication channels between devices (a TCP connection).
  • Virtual circuits (VCs): logical paths through a network (a circuit-switched connection).

QoS parameterizationSearch on YouTube

QoS parameterization defines specific quality requirements for each service object, so the service meets the expected standards. Different bodies and systems parameterize it differently:

SourceWhat it parameterizes
ISO standardsTransport and network connections; parameters such as connection setup delay bounds
Tenet protocol suiteReal-time multimedia delivery; packet jitter and end-to-end delay bounds for real-time channels
METSQoS parameters for media calls, transport connections and VCs
RSVPFlow specifications for packet scheduling in routers and hosts
Operating systemsTasks or memory chunks labelled with deadlines, processing time and memory size
Middleware systemsDistributed objects, invocation methods or software components labelled with QoS parameters

QoS specificationSearch on YouTube

Perceptual QoSSearch on YouTube

Two major requirements:

  • Description of perceptive qualities: media quality, window size, response time, security.
  • Description of pricing qualities: the range of price the user is willing to pay.

Application QoSSearch on YouTube

Requirements are stated in terms of:

  • Media quality: frame rate, frame resolution, latency, jitter.
  • Media relations: media transformations, frame syncs.
  • Adaptation rules: actions to take if network bandwidth is scarce.

Application-level specification approachesSearch on YouTube

ApproachHow QoS is specifiedExample
Script-basedQoS added to scripting languages such as TclA Python script lowers video bitrate when bandwidth drops
Parameter-basedQoS parameters held in data structuresA web-conferencing user sets maximum latency and minimum bandwidth; the app prioritizes streams
Process-orientedCommunicating end-ports are processes with QoS attachedEach game client is a process; game updates and input handling get priority
Control-based logicAdaptive policies and flow control describe QoS changesA VoIP app adjusts packet size or retransmits when jitter is excessive
Aspect-basedQoS is part of aspect-oriented programmingAn aspect handles error recovery and retransmission across components
Object-orientedQoS attached to an objectEach media stream object carries bitrate, resolution and buffering time

System QoS parametersSearch on YouTube

These describe requirements placed on communication and computing services. They are derived from application QoS.

  • Quantitative: bits per second, number of errors, task processing time, task period.
  • Qualitative: frame synchronization, ordered data delivery, error-recovery mechanisms, scheduling mechanisms.

Network QoS parametersSearch on YouTube

These describe requirements on low-level network services.

  • Network load: inter-arrival time on the connection, burstiness, packet or cell size, service time in the node for a connection's packet.
  • Network performance: delay, packet loss, jitter.

All these parameters are enclosed in the traffic envelope.

Device QoS parametersSearch on YouTube

These specify timing and throughput demands for media data units from audio and video devices, such as speakers or video capture boards.

From application QoS to network QoS (bandwidth calculation). An application asks for PAL-size MPEG video: Y at 352 x 288, Cb and Cr each at 176 x 144, 8 bits per sample, 25 frames per second (numbers from the video deck, see L03). What throughput must the network reserve before compression?

Step 1. Samples per frame. 352×288=101,376352 \times 288 = 101{,}376 luminance samples. 2×(176×144)=50,6882 \times (176 \times 144) = 50{,}688 chrominance samples. Total 152,064152{,}064 samples.

Step 2. Bits per frame. 152,064×8=1,216,512152{,}064 \times 8 = 1{,}216{,}512 bits.

Step 3. Bitrate. 1,216,512×25=30,412,8001{,}216{,}512 \times 25 = 30{,}412{,}800 bit/s ≈30.4\approx 30.4 Mbit/s.

Step 4. Read it. An uncompressed stream needs about 30.4 Mbit/s of guaranteed throughput. MPEG compression is what makes the stream fit a normal link, and ABR lowers the rate further when bandwidth is scarce.

QoS parameter values and service classesSearch on YouTube

The QoS parameter values decide the service class: guaranteed, predictive (predictable) or best effort. The class determines two things: the reliability of the offered QoS and the utilization of resources.

Class 1: guaranteed servicesSearch on YouTube

Guaranteed services make sure multimedia applications receive the resources they need (bandwidth, processing power) to work without interruption. For multimedia this usually means the right bandwidth, low delay and minimal errors. This is resource reservation.

Deterministic representation

Deterministic QoS means performance parameters can be calculated or guaranteed in advance. They are positive real numbers (frame rate, resolution) measured over time TT:

QoS:T→RQoS : T \rightarrow R

Here TT is the time duration of the service for which QoS is specified, and RR is the set of positive real numbers representing the QoS parameters.

Sometimes one value cannot describe the requirement ("How many dosa do you eat?"). So bounds come as a single value, a pair or a triple.

FormValuesAnalogy from the deck
Single valueAverage, contractual, threshold or target valueNetflix paid plan guarantees 1080p for the whole session
Pair of valuesMinimum and average, or lowest and target: QoSmin≤QoS(t)≤QoSmaxQoS_{min} \le QoS(t) \le QoS_{max}Video call frame rate at least 15 fps, up to 30 fps
Triple of valuesBest QoSmaxQoS_{max}, average QoSaveQoS_{ave}, worst QoSminQoS_{min}Unstable network: average 720p, best 1080p, worst 480p

The pair specification splits the range into regions:

  • Acceptable quality region: [QoSmin,QoSmax][QoS_{min}, QoS_{max}]
  • Unacceptable quality region: QoS(t)<QoSminQoS(t) < QoS_{min}

The deck's graph plots frame rate (fps) against resolution (pixels). Dashed lines mark the minimum and maximum QoS frame rate (10 and 30 fps) and the minimum and maximum resolution (80 x 40 and 640 x 480). The area inside is acceptable. A very low frame rate or resolution falls in the unacceptable region: choppy or pixelated video, like 240p for a viewer who expects HD.

The summary also names a statistical representation for guaranteed services, next to the deterministic one.

Class 2: predictable servicesSearch on YouTube

Predictable service gives a consistent level of performance based on historical data and predictive algorithms.

  1. Historical data collection: gather bandwidth, latency, jitter and packet loss over a period.
  2. Data analysis: find patterns, trends and anomalies with mean, median, standard deviation and correlation.
  3. Predictive model development: a simple statistical model or a complex machine learning algorithm.
  4. Prediction: use current conditions and history to predict future performance.
  5. QoS guarantee: promise a level based on the prediction, such as minimum bandwidth, maximum latency, or both.

Predictable service class for a QoS parameter (sliding-window average of past values):

Bp=1L×∑i=n−LnBiB^{p} = \frac{1}{L} \times \sum_{i=n-L}^{n} B_i

BpB^{p} is the predictable value the service can reliably provide. LL is the sliding window length (how many past values are used). BiB_i is the parameter value at time ii.

Predictable bandwidth. Bandwidth over the past 5 minutes: B1=10B_1 = 10, B2=12B_2 = 12, B3=8B_3 = 8, B4=11B_4 = 11, B5=9B_5 = 9 Mbit/s. Window L=3L = 3.

Step 1. Take the last L=3L = 3 values: B3,B4,B5B_3, B_4, B_5.

Step 2. Bp=13(8+11+9)=283B^{p} = \frac{1}{3}(8 + 11 + 9) = \frac{28}{3}.

Step 3. 283≈9.33\frac{28}{3} \approx 9.33 Mbit/s. The slide rounds this to 9 Mbit/s, the predictable bandwidth from the last 3 minutes.

The slide's sum runs from i=n−Li = n - L to nn, which is L+1L + 1 terms. Its worked example averages exactly LL values (B3B_3 to B5B_5). In the exam, follow the example: average the last LL values and divide by LL. Also note the exact average is 9.33, not 9.

Class 3: best-effort servicesSearch on YouTube

Best-effort services guarantee no level of performance or reliability. There are no promises about speed, latency or delivery. The network tries its best.

Multimedia services (video streaming, online gaming) need stable, predictable QoS. A buffering stream or a lagging game hurts the user badly. So they need guaranteed bandwidth, delay and jitter, not best effort.

G P B = "Gold, Plan, Best of luck": Guaranteed (reserved, deterministic bounds), Predictable (history average), Best effort (no promise).

Resource managementSearch on YouTube

(Text book T1, chapter 2.3.) Available resources decide the actual QoS. A resource is a system entity that tasks need to manipulate data. Each resource has distinguishing characteristics.

Classification of resourcesSearch on YouTube

PairFirst kindSecond kind
Active vs passiveActive: processes data. CPU and GPU decode video or render graphics; a network adapter handles streaming packets.Passive: supports active resources but does not process data. RAM holding video data; disk space storing video files.
Exclusive vs sharedExclusive: dedicated to one task at a time. The camera hardware during recording.Shared: many tasks use it. Several video players reading the same storage.
Single vs multipleSingle: one GPU handles only a limited number of high-quality streams.Multiple: several CPU cores or GPUs render a game and encode video at the same time.

Capacity and requirementSearch on YouTube

  • Capacity: each resource needs a certain capacity to complete a task: processor bandwidth, network bandwidth or memory space.
  • Requirement: real-time multimedia needs resources not only in large amounts but exactly when required.

What resource management meansSearch on YouTube

In multimedia systems, resource management makes sure the system has enough CPU, memory, storage and network bandwidth for the audio, video and data being processed.

Why it matters: audio and video files are large and need fast processing. Compression helps, but high-quality audio and video together still need many resources. A movie must load quickly with sound matching the video, without delay or buffering. Poor management gives delays, pixelation or late parts.

PhasesSearch on YouTube

PhaseWhat happensExample
EstablishmentBefore starting, check that enough resources exist without hurting other running applications (admission check)Before a video call, check bandwidth and CPU without disturbing someone downloading on the same network
RuntimeContinuously check and allocate. On conflict, adjust and share fairly without lowering qualitySomeone starts heavy network use during your call

Requirements on resource managementSearch on YouTube

RequirementMeaningExample
ThroughputAmount of data transferred over a connection per unit timeYouTube data downloaded per second: high gives smooth HD, low gives buffering
DelayTime for data to travel from one point to another. Local delay: processing time on the device. End-to-end delay: sender to receiver including all processing and transmissionLocal: click play until sound. End-to-end: speaker talks until listener hears
JitterVariation in arrival timeHigh jitter makes music sound uneven, sometimes fast, sometimes slow
ReliabilityTransmission without errors, handling losses with correctionPixelation in a live stream; fixed with error correction

T D J R = "Totally Delayed, Jumpy Replay": Throughput, Delay, Jitter, Reliability.

Media server architectureSearch on YouTube

(Text book T1, chapter 4.1.) A media server is a special file server that sends multimedia data (video, music, time-sensitive content) to users within a specific time frame. It must deliver smoothly for a good experience, such as a movie stream or live broadcast. Media servers vary in hardware and software.

Normal file server versus multimedia file serverSearch on YouTube

FeatureNormal file serverMultimedia file server
Data typesDocuments, images, PDFsAudio, video, graphics
Access patternRandom accessSequential access
Real-time deliveryNot requiredCrucial (real-time streaming)
BandwidthLowerHigh
StorageStandardHigh-capacity, fast
ConcurrencyIndependent requestsMultiple streams
CachingMinimalExtensive buffering and caching
SchedulingSimpleComplex, real-time

Pull and push modelsSearch on YouTube

Pull modelPush model
Access controlClient basedServer based
Who is in controlThe client sends requests for pieces of content; the server repliesThe server sends content without a request for each piece
ExampleYouTube: you pick a video and pull itLive TV broadcast over the internet: the server streams to all viewers
SuitsOn-demand servicesLive events and scheduled broadcasts; everyone gets content at the same time

Quick self-testSearch on YouTube

Compare scaling/adaptation with resource reservation. Give one example of each.

Scaling adapts media quality in real time to the resources available (ABR on Netflix, YouTube). Reservation reserves bandwidth, CPU and memory in advance so they are always available (VoIP: Skype, WhatsApp, Zoom).

Define a deadline. Differentiate soft and hard deadlines.

A deadline is the latest acceptable time to present a result; it separates correct from failing behaviour. Soft deadlines can be missed without catastrophe if not too many are missed and not by much. Hard deadlines must never be violated; a violation is a system failure, and they come from the physical characteristics of the process.

Why is missing a deadline worse for audio than for video?

An occasional missing video frame is barely visible. Human ears are more sensitive to small sound glitches, so a missed audio deadline is noticed.

List the five QoS layers with two parameters each.

Perceptual (visual quality, smoothness), Application (latency, jitter), System (processing power, memory), Device (display resolution, battery life), Network (bandwidth, packet loss).

A mobile video-learning app must specify its QoS. Which application-level specification approach would you use and which parameters?

A parameter-based approach (QoS in data structures) with adaptation rules, or a control-based approach for adaptive policies. Parameters: media quality (frame rate, resolution, latency, jitter), media relations (audio-video sync), and adaptation rules (lower bitrate when bandwidth is scarce).

Explain the pair-of-values specification and its regions.

It gives a minimum and maximum: QoSmin≤QoS(t)≤QoSmaxQoS_{min} \le QoS(t) \le QoS_{max}, for example 15 to 30 fps. Values inside form the acceptable region; QoS(t)<QoSminQoS(t) < QoS_{min} is the unacceptable region (choppy or pixelated video).

Bandwidth samples are 10, 12, 8, 11, 9 Mbit/s. Find the predictable bandwidth with L = 3.

Average the last three: (8+11+9)/3=9.33(8 + 11 + 9)/3 = 9.33 Mbit/s, about 9 Mbit/s as on the slide.

Why is best effort not enough for multimedia?

Best effort gives no guarantee on speed, latency or delivery. Streaming and gaming need stable bandwidth, delay and jitter; otherwise buffering or lag ruins the experience.

Classify resources with examples.

Active (CPU, GPU, network adapter) versus passive (RAM, disk). Exclusive (camera while recording) versus shared (common storage). Single (one GPU) versus multiple (multi-core CPU, several GPUs).

Name the two phases and four requirements of resource management.

Phases: establishment (admission check before starting) and runtime (continuous allocation and fair adjustment). Requirements: throughput, delay (local and end-to-end), jitter, reliability.

  • Two ways to handle streams: scaling/adaptation (ABR) and resource reservation (VoIP).
  • Real-time process delivers results within a given time-span. Soft deadlines tolerate a few misses; hard deadline misses are failures.
  • QoS is parameterized and layered: perceptual, application, system, device, network.
  • Application-level specification approaches: script, parameter, process, control logic, aspect, object.
  • Service classes: guaranteed (deterministic QoS:T→RQoS : T \rightarrow R, single/pair/triple values), predictable (BpB^p sliding average), best effort.
  • Resources: active/passive, exclusive/shared, single/multiple. Phases: establishment and runtime.
  • Requirements: throughput, delay, jitter, reliability.
  • Media servers deliver sequential, real-time streams; pull (client, on-demand) versus push (server, live).