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.
| Approach | Idea | Example |
|---|---|---|
| Scaling and adaptation | Adjust 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 reservation | Reserve 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 deadline | Hard deadline | |
|---|---|---|
| Meaning | Flexible; can be missed without catastrophic consequences | Must never be violated |
| When used | Exact timing is not critical and minor deviations are tolerated | Set by the physical characteristics of real-time processes |
| Condition | Acceptable as long as not too many deadlines are missed and deadlines are not missed by much | A violation is a system failure |
Characteristics of real-time systemsSearch on YouTube
| Characteristic | Meaning |
|---|---|
| Predictably fast response | To time-critical events, with accurate timing information |
| High degree of schedulability | Refers to resource utilization and meeting deadlines |
| Stability under transient overload | Critical 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.
| Layer | Meaning | Parameters |
|---|---|---|
| Perceptual QoS | Subjective quality as perceived by the user | Visual quality (resolution, colour, artifacts), audio quality (clarity, distortion), overall experience (smoothness, responsiveness) |
| Application QoS | Objective quality provided by an application | Latency, jitter, bandwidth, packet loss, error rate, throughput |
| System QoS | Quality provided by the underlying system | Processing power, memory, storage, device compatibility |
| Device QoS | Quality provided by individual devices | Display resolution, audio quality, I/O speed, battery life |
| Network QoS | Quality provided by the network infrastructure | Bandwidth, 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:
| Source | What it parameterizes |
|---|---|
| ISO standards | Transport and network connections; parameters such as connection setup delay bounds |
| Tenet protocol suite | Real-time multimedia delivery; packet jitter and end-to-end delay bounds for real-time channels |
| METS | QoS parameters for media calls, transport connections and VCs |
| RSVP | Flow specifications for packet scheduling in routers and hosts |
| Operating systems | Tasks or memory chunks labelled with deadlines, processing time and memory size |
| Middleware systems | Distributed 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
| Approach | How QoS is specified | Example |
|---|---|---|
| Script-based | QoS added to scripting languages such as Tcl | A Python script lowers video bitrate when bandwidth drops |
| Parameter-based | QoS parameters held in data structures | A web-conferencing user sets maximum latency and minimum bandwidth; the app prioritizes streams |
| Process-oriented | Communicating end-ports are processes with QoS attached | Each game client is a process; game updates and input handling get priority |
| Control-based logic | Adaptive policies and flow control describe QoS changes | A VoIP app adjusts packet size or retransmits when jitter is excessive |
| Aspect-based | QoS is part of aspect-oriented programming | An aspect handles error recovery and retransmission across components |
| Object-oriented | QoS attached to an object | Each 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. luminance samples. chrominance samples. Total samples.
Step 2. Bits per frame. bits.
Step 3. Bitrate. bit/s 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 :
Here is the time duration of the service for which QoS is specified, and 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.
| Form | Values | Analogy from the deck |
|---|---|---|
| Single value | Average, contractual, threshold or target value | Netflix paid plan guarantees 1080p for the whole session |
| Pair of values | Minimum and average, or lowest and target: | Video call frame rate at least 15 fps, up to 30 fps |
| Triple of values | Best , average , worst | Unstable network: average 720p, best 1080p, worst 480p |
The pair specification splits the range into regions:
- Acceptable quality region:
- Unacceptable quality region:
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.
- Historical data collection: gather bandwidth, latency, jitter and packet loss over a period.
- Data analysis: find patterns, trends and anomalies with mean, median, standard deviation and correlation.
- Predictive model development: a simple statistical model or a complex machine learning algorithm.
- Prediction: use current conditions and history to predict future performance.
- 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):
is the predictable value the service can reliably provide. is the sliding window length (how many past values are used). is the parameter value at time .
Predictable bandwidth. Bandwidth over the past 5 minutes: , , , , Mbit/s. Window .
Step 1. Take the last values: .
Step 2. .
Step 3. Mbit/s. The slide rounds this to 9 Mbit/s, the predictable bandwidth from the last 3 minutes.
The slide's sum runs from to , which is terms. Its worked example averages exactly values ( to ). In the exam, follow the example: average the last values and divide by . 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
| Pair | First kind | Second kind |
|---|---|---|
| Active vs passive | Active: 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 shared | Exclusive: 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 multiple | Single: 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
| Phase | What happens | Example |
|---|---|---|
| Establishment | Before 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 |
| Runtime | Continuously check and allocate. On conflict, adjust and share fairly without lowering quality | Someone starts heavy network use during your call |
Requirements on resource managementSearch on YouTube
| Requirement | Meaning | Example |
|---|---|---|
| Throughput | Amount of data transferred over a connection per unit time | YouTube data downloaded per second: high gives smooth HD, low gives buffering |
| Delay | Time 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 transmission | Local: click play until sound. End-to-end: speaker talks until listener hears |
| Jitter | Variation in arrival time | High jitter makes music sound uneven, sometimes fast, sometimes slow |
| Reliability | Transmission without errors, handling losses with correction | Pixelation 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
| Feature | Normal file server | Multimedia file server |
|---|---|---|
| Data types | Documents, images, PDFs | Audio, video, graphics |
| Access pattern | Random access | Sequential access |
| Real-time delivery | Not required | Crucial (real-time streaming) |
| Bandwidth | Lower | High |
| Storage | Standard | High-capacity, fast |
| Concurrency | Independent requests | Multiple streams |
| Caching | Minimal | Extensive buffering and caching |
| Scheduling | Simple | Complex, real-time |
Pull and push modelsSearch on YouTube
| Pull model | Push model | |
|---|---|---|
| Access control | Client based | Server based |
| Who is in control | The client sends requests for pieces of content; the server replies | The server sends content without a request for each piece |
| Example | YouTube: you pick a video and pull it | Live TV broadcast over the internet: the server streams to all viewers |
| Suits | On-demand services | Live 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: , for example 15 to 30 fps. Values inside form the acceptable region; 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: 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 , single/pair/triple values), predictable ( 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).