Presentation is loading. Please wait.

Presentation is loading. Please wait.

Jim Anderson 1 Multiprocessor Fair Scheduling The Case for Multiprocessor Fair Scheduling James H. Anderson University of North Carolina at Chapel Hill.

Similar presentations


Presentation on theme: "Jim Anderson 1 Multiprocessor Fair Scheduling The Case for Multiprocessor Fair Scheduling James H. Anderson University of North Carolina at Chapel Hill."— Presentation transcript:

1 Jim Anderson 1 Multiprocessor Fair Scheduling The Case for Multiprocessor Fair Scheduling James H. Anderson University of North Carolina at Chapel Hill

2 Jim Anderson 2 Multiprocessor Fair Scheduling Real-time Adaptivity on Multiprocessors l Motivating Application: Whisper acoustic tracker for virtual environments. Tracking Computer Microphones on ceiling Speakers on hands and feet User

3 Jim Anderson 3 Multiprocessor Fair Scheduling Whisper Characteristics l Workload requires a multiprocessor. l Predictive techniques used in tracking. »Time to compute next prediction depends on accuracy of previous prediction. »  computational costs will vary. »Lots of microphones/speakers  lots of tasks! –Not practical to provision all tasks assuming max costs. l Question: How to ensure adaptive real-time execution on a multiprocessor?

4 Jim Anderson 4 Multiprocessor Fair Scheduling Multiprocessor Scheduling Partitioning Partition tasks so that each task always runs on the same processor. Steps: 1.Assign tasks to processors (bin packing). 2.Schedule tasks on each processor using uniprocessor algorithms.

5 Jim Anderson 5 Multiprocessor Fair Scheduling Problems with Partitioning l Variations in computation costs may necessitate a re-partitioning. l Problematic because: »Partitioning = bin packing… –…an intractable problem. »Re-partitionings may cause task migrations… –… the very thing partitioning is designed to avoid.

6 Jim Anderson 6 Multiprocessor Fair Scheduling Global Scheduling An Alternative to Partitioning A single scheduling algorithm is used that schedules all tasks. Important Difference: Tasks may migrate among the processors. Probably appropriate only on tightly-coupled systems. Rest of the Talk: Global scheduling algorithms that facilitate real-time adaptivity. Rest of the Talk: Global scheduling algorithms that facilitate real-time adaptivity.

7 Jim Anderson 7 Multiprocessor Fair Scheduling Deadline Scheduling Our Focus l We consider deadline scheduling algorithms wherein: »tasks repeatedly submit “pieces of work” to the system to schedule; »these pieces of work have deadlines; »the system schedules work on an earliest- deadline-first basis.

8 Jim Anderson 8 Multiprocessor Fair Scheduling The Periodic Task Model The Simplest Form of Recurrent Execution… l Periodic Tasks: »Task T = (T.e, T.p) releases a job with execution cost T.e every T.p time units. –T’s weight (or utilization or processor share) is T.wt = T.e/T.p. »Each job of T has a deadline at the next job release of T. 0102030 T = (2,5) 51525 U = (9,15) 2 5

9 Jim Anderson 9 Multiprocessor Fair Scheduling Job-based Scheduling Doesn’t Work l Can’t consider jobs as the pieces of work to schedule because deadlines can be missed. l Example: Scheduling three (2,3) tasks on two processors. 02 Processor 1 13 Processor 2 Job 1 of Task 2 Job 1 of Task 1 Job 1 of Task 3 missed deadline! (These three jobs have equal deadlines and hence are indistinguishable.)

10 Jim Anderson 10 Multiprocessor Fair Scheduling Alternative: Pfair Scheduling l Basic Ideas: »Processor time is allocated in multiples of some basic quantum. »Break jobs into quantum-length subtasks. »Assign deadlines to subtasks. task migration occurs here So, all pieces of work to schedule have a cost of 1. No deadlines are missed! 02 Processor 1 13 Processor 2 Job 1 of Task 2 Task 1 Job 1 of Task 3 Task 1 l Previous Example: quantum

11 Jim Anderson 11 Multiprocessor Fair Scheduling Some Details… Subtasks and Windows l Each subtask must execute within a certain time window. »End of window = deadline. l Window layout determined by task’s weight. l Several optimal Pfair scheduling algorithms are known. »Optimal = capable of ensuring all subtask (and job) deadlines as long as  T T.wt  M (the no. of processors)

12 Jim Anderson 12 Multiprocessor Fair Scheduling 0 1 2 3 4 5 6 7 8 9 10 First 6 windows of a task T with weight 6/10 Windowing Example T6T6 T5T5 T4T4 T3T3 T2T2 T1T1 Windows may be of two different lengths, and successive windows may overlap by one quantum. Deadline of T 3 Subtasks

13 Jim Anderson 13 Multiprocessor Fair Scheduling TIME 5 10 15 A 1/2 B 1/3 C 1/3 E 2/9 D 2/9 Example Pfair Schedule On Processor 1 TASKS On Processor 2

14 Jim Anderson 14 Multiprocessor Fair Scheduling Question: Can Non-periodic Recurrent Tasks be Supported? l Yes! »Developed the “early-release” (ER) model. –Enables work-conserving behavior. »Developed the “intra-sporadic” (IS) model. –Generalizes the sporadic model. »ER + IS = “rate-based”.

15 Jim Anderson 15 Multiprocessor Fair Scheduling ER and IS Models TIME 0 5 10 15 20 IS Delay Early Release Idea: Allow a subtask to execute “early”, i.e., before its window. Idea: Allow “delays” between subtask windows. TIME 0 5 10 15 20 ERfairness (“Early Release”) ISfairness (“Intra-Sporadic”)

16 Jim Anderson 16 Multiprocessor Fair Scheduling Question: Can Dynamic Tasks be Supported? l Yes! l Results: »Devised rules under which tasks can leave and join a running system. l These rules can be applied to adaptively reweight tasks. »Leave with old weight, join with new. »However, a significant delay may be incurred. (Dynamic = Tasks can Leave and Join)

17 Jim Anderson 17 Multiprocessor Fair Scheduling Question: Can Quick Adaptations be Supported? l Yes! l Two approaches: »Reactive: Increase task shares when there is idleness (available capacity). –Resulting scheme: Quick-release fair (QRfair). »Proactive: Allow tasks to register weight-change requests with the scheduler. –Resulting scheme: Proactive fair (PROfair).

18 Jim Anderson 18 Multiprocessor Fair Scheduling Proactive vs. Reactive spare capacity becomes available No adaptivity idle processor encountered  shift next window left QRfair (reactive) PROfair (proactive) increase weight to consume available capacity (Figure depicts the window layout of one task)

19 Jim Anderson 19 Multiprocessor Fair Scheduling QRfair Experiment From RTSS 2003

20 Jim Anderson 20 Multiprocessor Fair Scheduling Other Research l Devised efficient synchronization techniques for Pfair-scheduled systems. l Devised techniques for discouraging task migrations. l Devised techniques for minimizing bus contention in such systems. l Developed a prototype threads package. l New Project: Use this threads package to re- implement Whisper.

21 Jim Anderson 21 Multiprocessor Fair Scheduling Conclusions l Partitioning seems ill-suited for highly adaptive multiprocessor systems. »Moreover, partitioning has been studied for over 20 years and isn’t likely to improve. l The case for Global Scheduling (Pfair, in particular) is likely to improve with further research. »More research needed (for example) on… –support for device I/O, –coupling feedback control mechanisms with adaptive reweighting schemes, –better techniques for discouraging migrations, particularly in soft real-time systems, –etc. etc. etc.

22 Jim Anderson 22 Multiprocessor Fair Scheduling References J. Anderson, A. Block, and A. Srinivasan, Quick-release fair scheduling, Proceedings of the 24th IEEE Real-time Systems Symposium, pp. 130-141, December 2003. J. Anderson, P. Holman, and A. Srinivasan, Fair multiprocessor scheduling, in Handbook on Scheduling: Algorithms, Models, and Performance Analysis, Joseph Y. Leung (ed.), Chapman and Hall/CRC, pp. 30.1-30.19, 2004. J. Anderson and A. Srinivasan, Early-release fair scheduling, Proceedings of the 12th Euromicro Conference on Real-time Systems, pp. 35-43, June 2000. J. Anderson and A. Srinivasan, Mixed Pfair/ERfair scheduling of asynchronous periodic tasks, Journal of Computer and System Sciences, 68(1):157-204, February, 2004. Preliminary version appeared in Proceedings of the 13th Euromicro Conference on Real- time Systems, pp. 76-85, June 2001. S. Baruah, N. Cohen, C.G. Plaxton, and D. Varvel, Proportionate progress: A notion of fairness in resource allocation, Algorithmica, 15:600-625, 1996. S. Baruah, J. Gehrke, and C.G. Plaxton, Fast scheduling of periodic tasks on multiple resources, Proceedings of the 9th International Parallel Processing Symposium, pp. 280- 288, April 1995.

23 Jim Anderson 23 Multiprocessor Fair Scheduling References (Continued) U. Devi and J. Anderson, Fair integrated scheduling of soft real-time tardiness class on multiprocessor platforms, Proceedings of the 10th IEEE Real-time and Embedded Technology and Applications Symposium, pp. 554-561, May 2004. U. Devi and J. Anderson, Improved conditions for bounded tardiness under EPDF fair multiprocessor scheduling, Proceedings of 12th International Workshop on Parallel and Distributed Real-Time Systems, April 2004 (on CD ROM). U. Devi and J. Anderson, Schedulable utilization bounds for EPDF fair multiprocessor scheduling, Proceedings of the 10th International Conference on Real-time and Embedded Computing Systems and Applications, August 2004, to appear. P. Holman, On the Implementation of Pfair-scheduled Multiprocessor Systems, Ph.D. Dissertation, University of North Carolina at Chapel Hill, August 2004. P. Holman and J. Anderson, Guaranteeing Pfair supertasks by reweighting, Proceedings of the 22nd IEEE Real-time Systems Symposium, pp. 203-212, December 2001. P. Holman and J. Anderson, Locking in Pfair-scheduled multiprocessor systems, Proceedings of the 23rd IEEE Real-time Systems Symposium, pp. 149-158, December 2002.

24 Jim Anderson 24 Multiprocessor Fair Scheduling References (Continued) P. Holman and J. Anderson, Object sharing in Pfair-scheduled multiprocessor systems, Proceedings of the 14th Euromicro Conference on Real-time Systems, pp. 111-120, June 2002. P. Holman and J. Anderson, Using hierarchal scheduling to improve resource utilization in multiprocessor real-time systems, Proceedings of the 15th Euromicro Conference on Real-time Systems, pp. 41-50, July 2003. P. Holman and J. Anderson, Implementing Pfairness on a symmetric multiprocessor, Proceedings of the 10th IEEE Real-time and Embedded Technology and Applications Symposium, pp. 544-553, May 2004. M. Moir and S. Ramamurthy, Pfair scheduling of fixed and migrating periodic tasks on multiple resources, Proceedings of the Twentieth IEEE Real-time Systems Symposium, pp. 294-303, December 1999. A. Srinivasan, Efficient and Flexible Fair Scheduling of Real-time Tasks on Multiprocessors, Ph.D. Dissertation, University of North Carolina at Chapel Hill, December 2003.

25 Jim Anderson 25 Multiprocessor Fair Scheduling References (Continued) A. Srinivasan and J. Anderson, Optimal rate-based scheduling on multiprocessors, Proceedings of the 34th ACM Symposium on Theory of Computing, pp. 189-198, May 2002. A. Srinivasan and J. Anderson, Efficient scheduling of soft real-time applications on multiprocessors, Journal of Embedded Computing (to appear), special issue of best papers from the 15th Euromicro Conference on Real-time Systems, 2003. Preliminary version appeared in Proceedings of the 15th Euromicro Conference on Real-time Systems, pp. 51- 59, July 2003. A. Srinivasan and J. Anderson, Fair scheduling of dynamic task systems on multiprocessors, Journal of Systems and Software (to appear), special issue of best papers from the 11th International Workshop on Parallel and Distributed Real-time Systems, 2004. A. Srinivasan, P. Holman, and J. Anderson, Integrating aperiodic and recurrent tasks on fair- scheduled multiprocessors, Proceedings of the 14th Euromicro Conference on Real-time Systems, pp. 19-28, June 2002. A. Srinivasan, P. Holman, J. Anderson, and S. Baruah, The case for fair multiprocessor scheduling, Proceedings of the 11th International Workshop on Parallel and Distributed Real-time Systems, April 2003 (on CD ROM).


Download ppt "Jim Anderson 1 Multiprocessor Fair Scheduling The Case for Multiprocessor Fair Scheduling James H. Anderson University of North Carolina at Chapel Hill."

Similar presentations


Ads by Google