operating system support for multimedia: qlinux
TRANSCRIPT
![Page 1: Operating System Support for Multimedia: QLinux](https://reader030.vdocuments.net/reader030/viewer/2022020705/61fb8a7e2e268c58cd5f644d/html5/thumbnails/1.jpg)
• Operating System Support for Multimedia
Slides courtesy of Tay Vaughan ‐ ”Making Multimedia Work”
![Page 2: Operating System Support for Multimedia: QLinux](https://reader030.vdocuments.net/reader030/viewer/2022020705/61fb8a7e2e268c58cd5f644d/html5/thumbnails/2.jpg)
Why Study Multimedia?
• Improvements:– Telecommunications– Environments– Communication– Fun
• Outgrowth from industry– telecommunications– consumer electronics– television
![Page 3: Operating System Support for Multimedia: QLinux](https://reader030.vdocuments.net/reader030/viewer/2022020705/61fb8a7e2e268c58cd5f644d/html5/thumbnails/3.jpg)
Continuous Media
• Subset of multimedia
• Includes timing relationship between server and client
• Stream:– video: mpeg, H.261, avi, QuickTime, MediaPlayer
– audio: MP3, µ‐law
![Page 4: Operating System Support for Multimedia: QLinux](https://reader030.vdocuments.net/reader030/viewer/2022020705/61fb8a7e2e268c58cd5f644d/html5/thumbnails/4.jpg)
Multimedia Resource Requirements
• Step up in media requires more bytes
• But not as much as some applications!– Graphics or transaction processing
Byt
es fo
r 1 P
age
text graphics color audio video
38K2K
300K
720K
7000K
![Page 5: Operating System Support for Multimedia: QLinux](https://reader030.vdocuments.net/reader030/viewer/2022020705/61fb8a7e2e268c58cd5f644d/html5/thumbnails/5.jpg)
Influences on Quality
Server
Client
S0 S2S1 S3
time
C0 C1
S4
C2 C3
t0
t0
Delay JitterDataLoss
![Page 6: Operating System Support for Multimedia: QLinux](https://reader030.vdocuments.net/reader030/viewer/2022020705/61fb8a7e2e268c58cd5f644d/html5/thumbnails/6.jpg)
An End‐To‐End Problem
• Server Application
• Operating System
• Network Protocol
• Client Application
• Operating System
• Network Protocol
---160148190...
160160160160...
Se
rv
er C
li
en
t
NetworkRouters
![Page 7: Operating System Support for Multimedia: QLinux](https://reader030.vdocuments.net/reader030/viewer/2022020705/61fb8a7e2e268c58cd5f644d/html5/thumbnails/7.jpg)
Application Performance in the QLinux Multimedia Operating System
Sundaram, A. Chandra, P. Goyal, P. Shenoy, J. Sahni and H. Vin
UMass Amherst, U of Texas Austin
In Proceedings of ACM Multimedia ConferenceNovember 2000
![Page 8: Operating System Support for Multimedia: QLinux](https://reader030.vdocuments.net/reader030/viewer/2022020705/61fb8a7e2e268c58cd5f644d/html5/thumbnails/8.jpg)
Introduction
• General purpose operating systems handling diverse set of tasks– Conventional best‐effort with low response time
• Ex: word processor
– Throughput intensive applications• Ex: compilation
– Soft real‐time applications• Ex: streaming media
• Many studies show can do one at a time, but when do two or more grossly inadequate– MPEG‐2 when compiling has a lot of jitter
![Page 9: Operating System Support for Multimedia: QLinux](https://reader030.vdocuments.net/reader030/viewer/2022020705/61fb8a7e2e268c58cd5f644d/html5/thumbnails/9.jpg)
Introduction
• Reason? Lack of service differentiation– Provide ‘best‐effort’ to all
• Special‐purpose operating systems are similarly inadequate for other mixes
• Need OS that:– Multiplexes resources in a predictable manner– Service differentiation to meet individual application requirements
![Page 10: Operating System Support for Multimedia: QLinux](https://reader030.vdocuments.net/reader030/viewer/2022020705/61fb8a7e2e268c58cd5f644d/html5/thumbnails/10.jpg)
Solution: QLinux
• Solution: QLinux (the Q is for Quality)– Enhance standard Linux– Hierarchical schedulers
• classes of applications or individual applications– CPU, Network, Disk
![Page 11: Operating System Support for Multimedia: QLinux](https://reader030.vdocuments.net/reader030/viewer/2022020705/61fb8a7e2e268c58cd5f644d/html5/thumbnails/11.jpg)
Outline
• QLinux philosophy
• CPU Scheduler– Evaluation
• List of other topics in paper– Packet Scheduler
– Disk Scheduler
– Lazy Receiver Processing
• Conclusion
![Page 12: Operating System Support for Multimedia: QLinux](https://reader030.vdocuments.net/reader030/viewer/2022020705/61fb8a7e2e268c58cd5f644d/html5/thumbnails/12.jpg)
QLinux Design Principles
• Support for Multiple Service Classes– Interactive, Throughput‐Intensive, Soft Real‐time
• Predictable Resource Allocation– Priority not enough (starvation of others)
– Ex: mpeg_decoder at highest can starve kernel
– Not static partitioning since unused can be used by others
![Page 13: Operating System Support for Multimedia: QLinux](https://reader030.vdocuments.net/reader030/viewer/2022020705/61fb8a7e2e268c58cd5f644d/html5/thumbnails/13.jpg)
QLinux Design Principles
• Service Differentiation– Within a class, applications treated differently
– Uses hierarchical schedulers
• Support for Legacy Applications– Support binaries of all existing applications (no special system calls required)
– No worse performance (but may be better)
![Page 14: Operating System Support for Multimedia: QLinux](https://reader030.vdocuments.net/reader030/viewer/2022020705/61fb8a7e2e268c58cd5f644d/html5/thumbnails/14.jpg)
QLinux Components
![Page 15: Operating System Support for Multimedia: QLinux](https://reader030.vdocuments.net/reader030/viewer/2022020705/61fb8a7e2e268c58cd5f644d/html5/thumbnails/15.jpg)
Hierarchical Start‐time Fair Queuing(H‐SFQ) CPU Scheduler
• Uses a tree• Each thread belongs to 1 leaf
• Each leaf is an application class
• Weights are of parent class • Each node has own
scheduler• Uses Start-Time Fair
Queuing at top for time for each
(Typical OS?)
![Page 16: Operating System Support for Multimedia: QLinux](https://reader030.vdocuments.net/reader030/viewer/2022020705/61fb8a7e2e268c58cd5f644d/html5/thumbnails/16.jpg)
CPU Scheduler System Calls
• Nodes can be created on the fly
• Processes can move from node to node
• Defaults to top-level fair scheduler if not specified
• Utilities to do external from applicationAllow support of legacy apps without modifying source
![Page 17: Operating System Support for Multimedia: QLinux](https://reader030.vdocuments.net/reader030/viewer/2022020705/61fb8a7e2e268c58cd5f644d/html5/thumbnails/17.jpg)
Experimental Setup
• Cluster of PCs– P2‐350 MHz– 64 MB RAM– RedHat 6.1– QLinux based on Linux 2.2.0
• Network– 100 Mb/s 3‐Com Ethernet– 3Com Superstack II switch (100 Mb/s)
• “Assume” machines and net lightly loaded
![Page 18: Operating System Support for Multimedia: QLinux](https://reader030.vdocuments.net/reader030/viewer/2022020705/61fb8a7e2e268c58cd5f644d/html5/thumbnails/18.jpg)
Experimental Workloads
• Inf: executes infinite loop – Compute‐intensive, Best effort
• Mpeg_play: Berkeley MPEG‐1 decoder– Compute‐intensive, Soft real‐time
• Apache Web Server and Client– I/O intensive, Best effort
• Streaming media server– I/O intensive, Soft real‐time
• Dhrystone: measure CPU performance– Compute‐instensive, Best effort
![Page 19: Operating System Support for Multimedia: QLinux](https://reader030.vdocuments.net/reader030/viewer/2022020705/61fb8a7e2e268c58cd5f644d/html5/thumbnails/19.jpg)
CPU Scheduler Evaluation‐1
• Two classes, run Inf for each
• Assign weights to each (ex: 1:1, 1:2, 1:4)
• Count the number of loops
![Page 20: Operating System Support for Multimedia: QLinux](https://reader030.vdocuments.net/reader030/viewer/2022020705/61fb8a7e2e268c58cd5f644d/html5/thumbnails/20.jpg)
CPU Scheduler Evaluation‐1 Results
“count” is proportional to CPU bandwidthallocated
![Page 21: Operating System Support for Multimedia: QLinux](https://reader030.vdocuments.net/reader030/viewer/2022020705/61fb8a7e2e268c58cd5f644d/html5/thumbnails/21.jpg)
CPU Scheduler Evaluation‐2
• Two classes, equal weights (1:1)
• Run two Inf
• Suspend one at t=250 seconds
• Restart at t=330 seconds
• Note count
![Page 22: Operating System Support for Multimedia: QLinux](https://reader030.vdocuments.net/reader030/viewer/2022020705/61fb8a7e2e268c58cd5f644d/html5/thumbnails/22.jpg)
CPU Scheduler Evaluation‐2 Results
(Counts twice as fast when other suspended)
![Page 23: Operating System Support for Multimedia: QLinux](https://reader030.vdocuments.net/reader030/viewer/2022020705/61fb8a7e2e268c58cd5f644d/html5/thumbnails/23.jpg)
CPU Scheduler Evaluation‐3
• Two classes: soft real‐time & best effort (1:1)• Run:
– MPEG_PLAY in real‐time (1.49 Mbps)– Dhrystone in best effort
• Increase Dhrystone’s from 1 to 2 to 3 …– Note MPEG bandwidth
• Re‐run experiment with Vanilla Linux
![Page 24: Operating System Support for Multimedia: QLinux](https://reader030.vdocuments.net/reader030/viewer/2022020705/61fb8a7e2e268c58cd5f644d/html5/thumbnails/24.jpg)
CPU Scheduler Evaluation‐3 Results
![Page 25: Operating System Support for Multimedia: QLinux](https://reader030.vdocuments.net/reader030/viewer/2022020705/61fb8a7e2e268c58cd5f644d/html5/thumbnails/25.jpg)
CPU Scheduler Evaluation‐4
• Explore another best‐effort case
• Run two Web servers (representing, say 2 different domains)
• Have clients generate many requests
• See if CPU bandwidth allocation is proportional
![Page 26: Operating System Support for Multimedia: QLinux](https://reader030.vdocuments.net/reader030/viewer/2022020705/61fb8a7e2e268c58cd5f644d/html5/thumbnails/26.jpg)
CPU Scheduler Evaluation‐4 Results
![Page 27: Operating System Support for Multimedia: QLinux](https://reader030.vdocuments.net/reader030/viewer/2022020705/61fb8a7e2e268c58cd5f644d/html5/thumbnails/27.jpg)
CPU Scheduler Overhead Evaluation
• Scheduler takes some overhead since recursively called
• Run Inf at increasing depth in scheduler hierarchy tree
• Record count for 300 seconds
![Page 28: Operating System Support for Multimedia: QLinux](https://reader030.vdocuments.net/reader030/viewer/2022020705/61fb8a7e2e268c58cd5f644d/html5/thumbnails/28.jpg)
CPU Scheduler Overhead Evaluation Results
![Page 29: Operating System Support for Multimedia: QLinux](https://reader030.vdocuments.net/reader030/viewer/2022020705/61fb8a7e2e268c58cd5f644d/html5/thumbnails/29.jpg)
QLinux Components
Disk- Not evaluatedPackets- Sending and “Lazy” Processing for Receiving
![Page 30: Operating System Support for Multimedia: QLinux](https://reader030.vdocuments.net/reader030/viewer/2022020705/61fb8a7e2e268c58cd5f644d/html5/thumbnails/30.jpg)
Conclusion
• Some improvement and some ideas• Still Much work to be done
– scheduling– memory management– network– disk
• M.S. Thesis– One piece in OS support puzzle