# <center><i class="fa fa-edit"></i> QoS Fundamentals Cont.</center>
###### tags: `Internship`
:::info
**Goal:**
- [x] Understand fundamentals of QoS applications
**Resources:**
[Notes Page](https://hackmd.io/@j-chen/rkUz8DeUw)
:::
## QoS Fundamentals
- 2 QoS perspectives: from the network or the user
- Elements of QoS:
- Throughput/bandwidth
- Fairness
- Latency
- Delay variation
- Loss/error rate
- Throughput: bit/second
- USER: adjust video quality (via frame size, rate, etc.)
- NETWORK: constant bit rate (CBR) or variable bit rate (VBR)

- Burstiness: measures bit rate variability of BR
- Burstiness = Mean Bit Rate (MBR) / Peak Bit Rate (PBR)
- Delay from
- Transmission
- Processing
- Transit
- Greatest source of delay variation
- Propagation: depends on distance, as packets may go on different paths every time
- Protocol processing: depends on hardware, protocols, network load
- Different paths = different intermediate nodes
- Even if the same nodes, they may have different traffic loads at different times
- Output queueing: depends on network congestion
- Delay variation
- Delay-jittered traffic: packets arrive early/late relative to time reference
- Receiver solutions:
- Adjust playback point
- Price: video may lag --> distortion
- Missing packet
- Price: fuzzy video --> distortion
- De-jitter buffer
- Most common method (largely no distortion)
- The reason why YouTube videos must first load
- Price: may take up a lot of memory
- Loss/error rate:
- Packet loss
- Network level loss caused by congestion, noisy channel
- Recovery methods:
- Error correction at physical layer
- Add extra protection bits
- Price: overhead
- Packet retransmission
- If error, request for retransmisison
- Price: delay
- Codec at app. layer
- Patch using surrounding bits
- Factors of application requirement
- Interactivity level: interactive or non-interactive
- User/App. characteristics (delay tolerance/intolerance, adaptive/nonadaptive)
- Application criticality (mission critical or not)
- Main QoS factors:
- Delay
- Delay jitter
- Degree of interactivity determines stringency of delay requirement
- Tolerance:
- Latency (delay)
- Distortion (error)
- Adaptive: adapt to QoS degradation
- Triggered by implicit/explicit feedback from network/end user
- Techniques:
- Rate adaptation
- Drop packets
- increase codec compression
- change media quality
- Delay adaptation
- De-jitter buffer
- Adaptive playback
- Criticality:
- Examples: remote surgery, telemedicine are very critical
- Representation of application requirement
- Quantitative: specific values, so harder to achieve
- Application technical spec (video codec)
- Qualitative: easier to meet
- "As much as possible" "lower in a certain application"
- QoS service categories
- Type of service:
- Quantitative
- Qualitative
- Best effort
- To which entity:
- Per-flow
- Per-class
- May use in different combinations (per-flow and quant., per-class and quant)
- 5 possible combinations
- Best effort does not care per-flow or per-class
- Examples:
- IntServ: per-flow and quant.
- Controlled Load IntServL per-flow and qual.
- DiffServ: per-class and qual.
- Most common
- Per-flow and qualitative are both easier to achieve