160 likes | 251 Views
The Design, Implementation, and Evaluation of SMART: A Scheduler for Multimedia Applications. Proceedings of the 16 th Symposium on Operating Systems Principles, St. Malo, France, October, 1997 Written by: Jason Nieh and Monica S. Lam Presented by: Jingwen Jin ( jjin1@cs.uiuc.edu ). Outline.
E N D
The Design, Implementation, and Evaluation of SMART: A Scheduler for Multimedia Applications Proceedings of the 16th Symposium on Operating Systems Principles, St. Malo, France, October, 1997 Written by: Jason Nieh and Monica S. Lam Presented by: Jingwen Jin (jjin1@cs.uiuc.edu) CS598kn
Outline • Problem with current solutions • The SMART scheduler • Performance results • Conclusions CS598kn
SVR4 UNIX Scheduler by AT&T • Hybrid scheme • Realtime static priority scheduler • Standard UNIX timesharing scheduler • Performance • Unacceptable system performance for multimedia applications CS598kn
Salient Features of Multimedia Applications • Insatiable resource demands and frequent overload • Co-existence with conventional computations • Soft real-time constraints • Dynamically adaptive applications • Dynamic environment and heterogeneous user preference CS598kn
Characteristics of SMART • Integrated scheme • Dynamic feedback to applications • Adjusts resource allocations dynamically as the load changes • Importance (for overall resource allocation) • Priorities • Weighted Fair Queueing (WFQ) • Urgency (decides when a task is allocated) • Earliest-Deadline Scheduling • Bias (ability to tolerate latency) CS598kn
The SMART Interfaces and Usage Model • Interface to application developer: • Time constraints (deadline and estimate of processing time) • Notifications (upcalls to inform application of deadline violation) • Interface to application users: • Priorities • Shares CS598kn
The SMART Scheduler (Principles) • Priority: don’t degrade performance of a high priority application in the presence of low priority application • Proportional sharing among real-time and conventional applications in the same priority class • Graceful transitions between fluctuations in load • Satisfying real-time constraints and fast interactive response time in under-load • Trading off instantaneous fairness for better real-time and interactive response time • Notification of missed deadlines CS598kn
Application Metrics • Urgency (specific to real-time applications) • Importance (common to all applications) • Represented as a value-tuple • Priority – static • Biased Virtual Finishing Time (BVFT) – dynamic CS598kn
Biased Virtual Finishing Time (BVFT) • One queue per priority • Tasks ordered in increasing BVFT values • Task virtual time (advances at speed Dt/S) • Queue virtual time (advances at speed Dt/SS) • Difference as a measure of whether or not the respective task has consumed its proportional allocation of resources • Bias (in VFT) created to defer long running batch computations during transient loads for real-time applications • BVFT provides: • Better system responsiveness while achieving proportional sharing CS598kn
Scheduling Algorithm • If a task with the highest value-tuple is a conventional task (without a deadline), schedule it • Otherwise • Create a candidate set consisting of all real-time tasks with higher value-tuple than that of the highest value-tuple conventional task • Use best-effort real-time scheduling to find task with earliest deadline that won't cause any tasks with higher value-tuple to miss their deadlines • If a task cannot be completed before its deadline, notify application CS598kn
Task Selection Candidate set (in decreasing value-tuple) working schedule (in increasing deadline order) A lower value-tuple task is inserted into working schedule if it does not cause higher value-tuple tasks to miss deadlines CS598kn
Scheduling Complexity • Cost of managing value-tuple list: • O(N), where N is number of active tasks. The bound assumes linear insertion into the list. If using tree structure, cost is O(logN) • Cost of managing working schedule: • O(NR2), where NR is the number of active real-time tasks of higher value than the highest value of best effort tasks. (worst case) • O(NR) – incremental algorithm CS598kn
Example CS598kn
Results • Implemented in Solaris 2.5.1, Sun SPARC 10, 150 MHz, 64 MB RAM • Tested benchmarks • Dhrystone (batch) • Typing (interactive) • Integrated Media Stream Player (real-time) • Results of Comparing UNIX SVR4, WFQ, and SMART: • Context switch: UNIX SVR4 (27 s), WFQ(42), SMART (47) • Best fairness in WFQ and SMART • SMART delivers over 250% more video frames on-time than SVR4, over 60% more than WFQ • Better interactive response CS598kn
Conclusions • Pros • Deliver more multimedia data on-time • Cons • Large overhead (management, context switch) • Difficult for users to predict shares well • Increasing BVFT (reset?) CS598kn
Questions??? CS598kn