• No results found

Multiprocessor Scheduling Approaches

There are two main approaches that are traditionally considered for scheduling on multiprocessors, they are partitioned and global scheduling. Scheduling algorithms where task migration is restricted are known as partitioned scheduling and where task migration is not restricted are known as global scheduling. In multiprocessor scheduling, sometimes these two approaches are combined which is called hybrid

scheduling [6, 7, 19, 25].

7.3.1

Partitioned Scheduling

In this approach, tasks are partitioned among available processors. It means, a task is assigned to a specific processor and is always scheduled only on that pro- cessor. Therefore, the multiprocessor system becomes a collection of independent uni-processor systems and a uni-processor scheduling algorithm will run for each core to schedule the tasks assigned to that processor. Unlike in global scheduling, in partitioned approach tasks cannot migrate from one processor to another, as this is prohibited for partitioned approach. For example, in multiprocessor scheduling with partitioned EDF (P-EDF), a uni-processor scheduling algorithm, earliest deadline

first is used to schedule the task set on each processor independently [22].

The following advantages have been observed for partitioned scheduling algorithms over global scheduling algorithms for scheduling on multiprocessors [22]

• A task may overrun its worst-case execution time, this situation only affects the tasks on the same processor.

• There is no penalty in terms of migration cost as each task only runs on the same processor.

• A priority queue is maintained for each processor, so the queue length is small and queue access is faster in comparison to global priority queue.

• The main advantages of using this approach for multiprocessor scheduling is that it reduces the multiprocessor scheduling to single processor scheduling, when the assignment of all tasks to processors has been done.

7.3. Multiprocessor Scheduling Approaches The following disadvantages have been observed for partitioned scheduling algo- rithms over global scheduling

• The main disadvantage of this approach is allocation of the tasks to the pro- cessors. Finding the optimal assignment of tasks to processors is a bin-packing problem which is NP-Hard in the strong sense.

• Partitioned approach is not work-conserving, i.e. a processor may remain idle while there may be some ready task to be scheduled on another processor and missing its deadline.

The performance of the partitioned scheduling algorithms depends on the bin pack- ing algorithms used to partition the tasks among the processors of the multiprocessor system. Truly, the bin packing algorithms cannot ensure a task partitioning that can achieve total utilization of more than (m + 1)/2 on a multiprocessor system where the number of processors is m [3]. Therefore, in the worst-case scenario, slightly more than 50% of the processing capacity of the multiprocessor system is used by the partitioned scheduling algorithms for the task execution while the other almost 50% remain unused [42].

7.3.2

Global Scheduling

In this approach, all the ready tasks are placed in a global priority queue and the scheduler selects the highest priority task from the queue for its execution. A task can be dispatched to any available processor even after preemption. Unlike partitioned scheduling, a task is not fixed onto a processor and task (job) migration is permitted in global scheduling. For example, the global version of EDF named global EDF (G-EDF) selects the m highest priority (earliest deadline) ready tasks to execute on the m processors of the multiprocessor system at time t [22].

The following advantages have been observed for global scheduling algorithms over partitioned scheduling algorithms for scheduling on multiprocessors [22]

• There are typically fewer preemptions because the scheduler needs to preempt a task when there is no idle processor but a task needs to be scheduled. • When a task used less time than its worst-case behavior then the time can be

used by all tasks, not a subset of tasks as in partitioned scheduling.

• This approach is more appropriate for open systems where load balancing / task allocation is not necessary for taskset changes.

• Some global scheduling algorithms are work-conserving, i.e. there will be no idle processor if there is a ready task needed to be scheduled.

The following disadvantages have been observed for global scheduling algorithms over partitioned scheduling algorithms for scheduling on multiprocessors

• Global scheduling uses a single queue for ready tasks. The queue length is long and queue access is time consuming.

• A job can be frequently migrated from one processor to another processor, this leads to a high migration overhead of the system.

In 2001, Andersson et al. [3] develop an utilization bounds for periodic task-sets with implicit deadlines. According to them, the maximum utilization bound for any global fixed job priority algorithm is (m + 1)/2. Thus, the G-EDF and its variants have the same utilization bound as partitioned EDF [42].

7.3.3

Hybrid Scheduling

In global scheduling, depending on the hardware architecture, a task may migrate from one processor to another frequently which leads to a very high migration over- head. This job migration results in excessive communication loads and cache misses which increase the worst case execution time that would not occur in the fully par- titioned or non-migration scheduling approaches. On the other hand, in partitioned scheduling, the total available processing capacity is fragmented and a large amount of processing capacity is unused and remains idle. In fully partitioned approach the maximum utilization bound is just about 50% of the total processing capacity thus the utilization is very low [22].

Furthermore, there are some systems that can be scheduled under fully partitioned or fully global scheduling approach because, some tasks are not permitted to migrate while some other are permitted to migrate [43].

The recently developed more general hybrid scheduling approach is cluster based scheduling which can be categorized as a generalization of partitioned and global scheduling protocols [43]. In this approach, tasks are statically assigned to clusters and then inside a cluster tasks are scheduled globally. There are two forms of clus- ter based scheduling; clusters can be physical or virtual. In physical cluster-based scheduling the processors are statically assigned to each cluster and each cluster will contain a subset of processors from the available multi-processor system. In virtual cluster-based scheduling the processors are dynamically mapped to each cluster, there is a one-to-many relationship between cluster and multiprocessors[43].

Thus, clustering is an approach where processors are partitioned into a smaller number of subsystems to which tasks are allocated. Therefore, the issue of capacity fragmentation in partitioned approaches is improved and the number of processors in each cluster are fewer than on the total system which reduces the global queue length and the migration overhead. The processors in the same cluster may share the same cache which reduces the penalty in terms of increasing worst-case execution time despite migrations.