Multiprocessor Real-
Multiprocessor Real-
Time Scheduling
Time Scheduling
Aaron Harris
Aaron Harris
CSE 666
CSE 666
Prof. Ganesan
Prof. Ganesan
Multiprocessor Scheduling
Multiprocessor Scheduling
 As more systems incorporate multiple
As more systems incorporate multiple
processors, interest in scheduling algorithms
processors, interest in scheduling algorithms
increases.
increases.
 Still relatively little research done (compared to
Still relatively little research done (compared to
uniprocessor scheduling).
uniprocessor scheduling).
 Due to increased complexity, much research
Due to increased complexity, much research
makes simplifications of their systems.
makes simplifications of their systems.
When and Where
When and Where
 Multiprocessor scheduling requires determining
Multiprocessor scheduling requires determining
both which task to run at a given time and on
both which task to run at a given time and on
which processor to run it on.
which processor to run it on.
 Added complexity as compared to scheduling in
Added complexity as compared to scheduling in
a uniprocessor environment.
a uniprocessor environment.
 Scheduling must account for not only the status
Scheduling must account for not only the status
of tasks, but the status of processors.
of tasks, but the status of processors.
Schedule Management
Schedule Management
 In a standard system, the schedule is controlled by the
In a standard system, the schedule is controlled by the
processor.
processor.
 Multiprocessor systems follow two general approaches:
Multiprocessor systems follow two general approaches:
master-slave and dedicated scheduler.
master-slave and dedicated scheduler.
 In master-slave, one processor handles all schedule
In master-slave, one processor handles all schedule
processing and also processes normal tasks.
processing and also processes normal tasks.
 Dedicated scheduler systems allocate an entire
Dedicated scheduler systems allocate an entire
processor to nothing but schedule processing. This can
processor to nothing but schedule processing. This can
be more efficient in complex systems with many
be more efficient in complex systems with many
processors.
processors.
Algorithm Selection
Algorithm Selection
 In a single processor system, rate-monotonic
In a single processor system, rate-monotonic
(for static priorities) and earliest-deadline-first
(for static priorities) and earliest-deadline-first
(for dynamic priorities) algorithms are the
(for dynamic priorities) algorithms are the
accepted best overall algorithms.
accepted best overall algorithms.
 There is no agreed-upon best algorithm for
There is no agreed-upon best algorithm for
multiprocessor systems (due to increased
multiprocessor systems (due to increased
complexity of algorithms and lack of research).
complexity of algorithms and lack of research).
Algorithm Categories
Algorithm Categories
 Most multiprocessor scheduling algorithms fall
Most multiprocessor scheduling algorithms fall
into one of two categories: global scheduling and
into one of two categories: global scheduling and
partitioned scheduling.
partitioned scheduling.
Partitioned Scheduling
Partitioned Scheduling
 All tasks are divided among the processors at compile
All tasks are divided among the processors at compile
time.
time.
 Each task can only execute on its assigned processor.
Each task can only execute on its assigned processor.
 Advantages: This turns each processor into a single
Advantages: This turns each processor into a single
processor system as far as scheduling is concerned. All
processor system as far as scheduling is concerned. All
research and theory of single processor scheduling then
research and theory of single processor scheduling then
applies to each processor.
applies to each processor.
 Disadvantages: The process of assigning tasks to
Disadvantages: The process of assigning tasks to
processors can be complicated and extremely inefficient
processors can be complicated and extremely inefficient
if done poorly. This can lead to poor system
if done poorly. This can lead to poor system
performance.
performance.
Global Scheduling
Global Scheduling
 All tasks are allowed to execute on all processors.
All tasks are allowed to execute on all processors.
 Tasks are scheduled from a global queue to individual
Tasks are scheduled from a global queue to individual
processors.
processors.
 Advantages: This technique allows for better processor
Advantages: This technique allows for better processor
utilization and overall system performance.
utilization and overall system performance.
 Disadvantages: The main disadvantage is “migration”.
Disadvantages: The main disadvantage is “migration”.
This is when a task is preempted on one processor and
This is when a task is preempted on one processor and
resumes execution on a different processor. This
resumes execution on a different processor. This
requires the context of the task to be moved from one
requires the context of the task to be moved from one
processor to another, which can be costly.
processor to another, which can be costly.
Problems: Dhall’s Effect
Problems: Dhall’s Effect
 Something interesting is the relation of ultization
Something interesting is the relation of ultization
to scheduliblity.
to scheduliblity.
 One may think that to be schedulable, the
One may think that to be schedulable, the
utilization of a set of tasks on
utilization of a set of tasks on n
n processors
processors
should simply be ≤
should simply be ≤ n
n.
.
 Dhall proved that the number must actually be
Dhall proved that the number must actually be
between
between n
n*ln(2) and
*ln(2) and n
n (Dhall’s Effect).
(Dhall’s Effect).
Problems: Schedule Complexity
Problems: Schedule Complexity
 Many types of scheduling (e.g. dynamic
Many types of scheduling (e.g. dynamic
priorities) that require extensive run-time
priorities) that require extensive run-time
calculations can become too complicated in a
calculations can become too complicated in a
multiprocessor environment.
multiprocessor environment.
 Due to this, most of the scheduling algorithms
Due to this, most of the scheduling algorithms
that have been researched use compile-time
that have been researched use compile-time
determined priorities.
determined priorities.
Problems: Resource Synchronization
Problems: Resource Synchronization
 Resource synchronization becomes a much
Resource synchronization becomes a much
larger issue in multiprocessor systems.
larger issue in multiprocessor systems.
 Even in a non-preemptive multiprocessor
Even in a non-preemptive multiprocessor
system, resource sharing can lead to task
system, resource sharing can lead to task
blocking.
blocking.
 More thought must be put into how and what
More thought must be put into how and what
resources are shared between tasks in a
resources are shared between tasks in a
multiprocessor system.
multiprocessor system.
Conclusions
Conclusions
 Multiprocessor scheduling algorithms are more
Multiprocessor scheduling algorithms are more
complex than uniprocessor systems.
complex than uniprocessor systems.
 There is still no decisively best multiprocessor
There is still no decisively best multiprocessor
scheduling algorithm.
scheduling algorithm.
 Multiprocessor systems will continue to become
Multiprocessor systems will continue to become
more and more prevalent, and as a result,
more and more prevalent, and as a result,
multiprocessor scheduling research and theory
multiprocessor scheduling research and theory
will have to continue to improve.
will have to continue to improve.
References
References
 Khemka A., Shyamasundar R. K., "An Optimal Multiprocessor Real-Time
Khemka A., Shyamasundar R. K., "An Optimal Multiprocessor Real-Time
Scheduling Algorithm", Journal of Parallel and Distributed Computing 43, 37-
Scheduling Algorithm", Journal of Parallel and Distributed Computing 43, 37-
45, 1997 http://citeseer.ist.psu.edu/khemka97optimal.html.
45, 1997 http://citeseer.ist.psu.edu/khemka97optimal.html.
 G. Manimaran, C. Siva Ram Murthy, "An Efficient Dynamic Scheduling
G. Manimaran, C. Siva Ram Murthy, "An Efficient Dynamic Scheduling
Algorithm for Multiprocessor Real-Time Systems," IEEE Transactions on
Algorithm for Multiprocessor Real-Time Systems," IEEE Transactions on
Parallel and Distributed Systems, Vol. 09, No. 3, pp. 312-319, March, 1998.
Parallel and Distributed Systems, Vol. 09, No. 3, pp. 312-319, March, 1998.
 K. Ramamritham, J.A. Stankovic, P.F. Shiah, "Efficient Scheduling
K. Ramamritham, J.A. Stankovic, P.F. Shiah, "Efficient Scheduling
Algorithms for Real-Time Multiprocessor Systems," IEEE Transactions on
Algorithms for Real-Time Multiprocessor Systems," IEEE Transactions on
Parallel and Distributed Systems, Vol. 01, No. 2, pp. 184-194, April, 1990.
Parallel and Distributed Systems, Vol. 01, No. 2, pp. 184-194, April, 1990.
 J. Carpenter et al., “A Categorization of Real-Time Multiprocessor Scheduling
J. Carpenter et al., “A Categorization of Real-Time Multiprocessor Scheduling
Problems and Algorithms,”
Problems and Algorithms,”
http://www.cs.uga.edu/~shelby/pubs/carpenterFHSAB2003.pdf.
http://www.cs.uga.edu/~shelby/pubs/carpenterFHSAB2003.pdf.
 S. K. Dhall, C. L. Liu, “On a Real-Time Scheduling Problem,” Operations
S. K. Dhall, C. L. Liu, “On a Real-Time Scheduling Problem,” Operations
Research, Vol. 26, No. 1, Scheduling (Jan. – Feb., 1978), pp. 127-140.
Research, Vol. 26, No. 1, Scheduling (Jan. – Feb., 1978), pp. 127-140.
Questions?
Questions?

Multiprocessor Real-Time Sched_uling.ppt

  • 1.
    Multiprocessor Real- Multiprocessor Real- TimeScheduling Time Scheduling Aaron Harris Aaron Harris CSE 666 CSE 666 Prof. Ganesan Prof. Ganesan
  • 2.
    Multiprocessor Scheduling Multiprocessor Scheduling As more systems incorporate multiple As more systems incorporate multiple processors, interest in scheduling algorithms processors, interest in scheduling algorithms increases. increases.  Still relatively little research done (compared to Still relatively little research done (compared to uniprocessor scheduling). uniprocessor scheduling).  Due to increased complexity, much research Due to increased complexity, much research makes simplifications of their systems. makes simplifications of their systems.
  • 3.
    When and Where Whenand Where  Multiprocessor scheduling requires determining Multiprocessor scheduling requires determining both which task to run at a given time and on both which task to run at a given time and on which processor to run it on. which processor to run it on.  Added complexity as compared to scheduling in Added complexity as compared to scheduling in a uniprocessor environment. a uniprocessor environment.  Scheduling must account for not only the status Scheduling must account for not only the status of tasks, but the status of processors. of tasks, but the status of processors.
  • 4.
    Schedule Management Schedule Management In a standard system, the schedule is controlled by the In a standard system, the schedule is controlled by the processor. processor.  Multiprocessor systems follow two general approaches: Multiprocessor systems follow two general approaches: master-slave and dedicated scheduler. master-slave and dedicated scheduler.  In master-slave, one processor handles all schedule In master-slave, one processor handles all schedule processing and also processes normal tasks. processing and also processes normal tasks.  Dedicated scheduler systems allocate an entire Dedicated scheduler systems allocate an entire processor to nothing but schedule processing. This can processor to nothing but schedule processing. This can be more efficient in complex systems with many be more efficient in complex systems with many processors. processors.
  • 5.
    Algorithm Selection Algorithm Selection In a single processor system, rate-monotonic In a single processor system, rate-monotonic (for static priorities) and earliest-deadline-first (for static priorities) and earliest-deadline-first (for dynamic priorities) algorithms are the (for dynamic priorities) algorithms are the accepted best overall algorithms. accepted best overall algorithms.  There is no agreed-upon best algorithm for There is no agreed-upon best algorithm for multiprocessor systems (due to increased multiprocessor systems (due to increased complexity of algorithms and lack of research). complexity of algorithms and lack of research).
  • 6.
    Algorithm Categories Algorithm Categories Most multiprocessor scheduling algorithms fall Most multiprocessor scheduling algorithms fall into one of two categories: global scheduling and into one of two categories: global scheduling and partitioned scheduling. partitioned scheduling.
  • 7.
    Partitioned Scheduling Partitioned Scheduling All tasks are divided among the processors at compile All tasks are divided among the processors at compile time. time.  Each task can only execute on its assigned processor. Each task can only execute on its assigned processor.  Advantages: This turns each processor into a single Advantages: This turns each processor into a single processor system as far as scheduling is concerned. All processor system as far as scheduling is concerned. All research and theory of single processor scheduling then research and theory of single processor scheduling then applies to each processor. applies to each processor.  Disadvantages: The process of assigning tasks to Disadvantages: The process of assigning tasks to processors can be complicated and extremely inefficient processors can be complicated and extremely inefficient if done poorly. This can lead to poor system if done poorly. This can lead to poor system performance. performance.
  • 8.
    Global Scheduling Global Scheduling All tasks are allowed to execute on all processors. All tasks are allowed to execute on all processors.  Tasks are scheduled from a global queue to individual Tasks are scheduled from a global queue to individual processors. processors.  Advantages: This technique allows for better processor Advantages: This technique allows for better processor utilization and overall system performance. utilization and overall system performance.  Disadvantages: The main disadvantage is “migration”. Disadvantages: The main disadvantage is “migration”. This is when a task is preempted on one processor and This is when a task is preempted on one processor and resumes execution on a different processor. This resumes execution on a different processor. This requires the context of the task to be moved from one requires the context of the task to be moved from one processor to another, which can be costly. processor to another, which can be costly.
  • 9.
    Problems: Dhall’s Effect Problems:Dhall’s Effect  Something interesting is the relation of ultization Something interesting is the relation of ultization to scheduliblity. to scheduliblity.  One may think that to be schedulable, the One may think that to be schedulable, the utilization of a set of tasks on utilization of a set of tasks on n n processors processors should simply be ≤ should simply be ≤ n n. .  Dhall proved that the number must actually be Dhall proved that the number must actually be between between n n*ln(2) and *ln(2) and n n (Dhall’s Effect). (Dhall’s Effect).
  • 10.
    Problems: Schedule Complexity Problems:Schedule Complexity  Many types of scheduling (e.g. dynamic Many types of scheduling (e.g. dynamic priorities) that require extensive run-time priorities) that require extensive run-time calculations can become too complicated in a calculations can become too complicated in a multiprocessor environment. multiprocessor environment.  Due to this, most of the scheduling algorithms Due to this, most of the scheduling algorithms that have been researched use compile-time that have been researched use compile-time determined priorities. determined priorities.
  • 11.
    Problems: Resource Synchronization Problems:Resource Synchronization  Resource synchronization becomes a much Resource synchronization becomes a much larger issue in multiprocessor systems. larger issue in multiprocessor systems.  Even in a non-preemptive multiprocessor Even in a non-preemptive multiprocessor system, resource sharing can lead to task system, resource sharing can lead to task blocking. blocking.  More thought must be put into how and what More thought must be put into how and what resources are shared between tasks in a resources are shared between tasks in a multiprocessor system. multiprocessor system.
  • 12.
    Conclusions Conclusions  Multiprocessor schedulingalgorithms are more Multiprocessor scheduling algorithms are more complex than uniprocessor systems. complex than uniprocessor systems.  There is still no decisively best multiprocessor There is still no decisively best multiprocessor scheduling algorithm. scheduling algorithm.  Multiprocessor systems will continue to become Multiprocessor systems will continue to become more and more prevalent, and as a result, more and more prevalent, and as a result, multiprocessor scheduling research and theory multiprocessor scheduling research and theory will have to continue to improve. will have to continue to improve.
  • 13.
    References References  Khemka A.,Shyamasundar R. K., "An Optimal Multiprocessor Real-Time Khemka A., Shyamasundar R. K., "An Optimal Multiprocessor Real-Time Scheduling Algorithm", Journal of Parallel and Distributed Computing 43, 37- Scheduling Algorithm", Journal of Parallel and Distributed Computing 43, 37- 45, 1997 http://citeseer.ist.psu.edu/khemka97optimal.html. 45, 1997 http://citeseer.ist.psu.edu/khemka97optimal.html.  G. Manimaran, C. Siva Ram Murthy, "An Efficient Dynamic Scheduling G. Manimaran, C. Siva Ram Murthy, "An Efficient Dynamic Scheduling Algorithm for Multiprocessor Real-Time Systems," IEEE Transactions on Algorithm for Multiprocessor Real-Time Systems," IEEE Transactions on Parallel and Distributed Systems, Vol. 09, No. 3, pp. 312-319, March, 1998. Parallel and Distributed Systems, Vol. 09, No. 3, pp. 312-319, March, 1998.  K. Ramamritham, J.A. Stankovic, P.F. Shiah, "Efficient Scheduling K. Ramamritham, J.A. Stankovic, P.F. Shiah, "Efficient Scheduling Algorithms for Real-Time Multiprocessor Systems," IEEE Transactions on Algorithms for Real-Time Multiprocessor Systems," IEEE Transactions on Parallel and Distributed Systems, Vol. 01, No. 2, pp. 184-194, April, 1990. Parallel and Distributed Systems, Vol. 01, No. 2, pp. 184-194, April, 1990.  J. Carpenter et al., “A Categorization of Real-Time Multiprocessor Scheduling J. Carpenter et al., “A Categorization of Real-Time Multiprocessor Scheduling Problems and Algorithms,” Problems and Algorithms,” http://www.cs.uga.edu/~shelby/pubs/carpenterFHSAB2003.pdf. http://www.cs.uga.edu/~shelby/pubs/carpenterFHSAB2003.pdf.  S. K. Dhall, C. L. Liu, “On a Real-Time Scheduling Problem,” Operations S. K. Dhall, C. L. Liu, “On a Real-Time Scheduling Problem,” Operations Research, Vol. 26, No. 1, Scheduling (Jan. – Feb., 1978), pp. 127-140. Research, Vol. 26, No. 1, Scheduling (Jan. – Feb., 1978), pp. 127-140.
  • 14.