Sie sind auf Seite 1von 14

Scheduling of Periodic Tasks in

Multiprocessor Systems
(under fixed-priority preemptive environment)
M. C. Govil
Head, CE Deptt.
MNIT, Jaipur

Malaviya National Institute Of Technology, Jaipur

Importance and Difficulties of


multiprocessor systems in RTS
The use of multiprocessor systems has become inevitable, as the
uniprocessor systems are unable to meet the computational demand and
other requirements of large real-time systems.
Employing multiprocessor systems for real-time applications is difficult
The scheduling algorithms for multiprocessor systems are more complex
than for uniprocessor systems because a multiprocessor scheduling
algorithm has to assign the tasks to one of the processor in the system
before it can be scheduled to execute on that processor.

Scheduling tasks in Multiprocessor


Systems - Issues
The general solution to problem of scheduling tasks in
multiprocessor systems involves the following two issues:
Assignment of tasks to processors in the system
Scheduling of tasks assigned to each individual processor

Assignment of Tasks to
Processors
The assignment of tasks to processors can be
dynamic
static.

Dynamic allocation:
Each job of a task may be executed on different processor
i.e. the tasksto-processors assignments may be changed
during execution of a task.
This scheme is also referred as non-partitioning or global
scheme or dynamic binding scheme.

Static allocation
Assigns a task to a processor permanently through all of its
execution such that all instances of a task execute on the
same processors.
Also known as static binding or partitioning scheme.
In partitioning scheme, the tasks are divided into groups
called partitions or modules.

Static allocation scheme


The scheduling algorithm used, influences the partitioning
process, as each individual module of tasks assigned to a
processor must have a feasible schedule on that processor
according to the designated algorithm.
The problem of scheduling is thus reduced to partitioning a
given task set into modules in such a way that the tasks in
each module are schedulable by themselves on a processor
according to a uniprocessor scheduling algorithm such that
the number of partitions and hence the number of processors
required is minimum.

The minimum number of partitions can be found by


exhaustive search.
Exhaustive search increases the number of partitions
exponentially with an increase in the number of tasks. This
will consume considerable amount of execution time and
thus will offset the advantage of using optimal partitions.
This leads, the development of suitable heuristic algorithms,
which can be efficiently implemented and require only a
limited number of additional processors as compared to an
optimal algorithm.

Comparison between partitioning and


non-partitioning schemes
The partitioning schemes have several advantages over nonpartitioning or global schemes.
Partitioning schemes are less complex and have low
overheads since the operation of assignment of tasks to
processors is performed only once.
If the assignment of tasks to processors is completed, wellknown uniprocessor scheduling algorithms can be used.

Algorithms for task assignment


schemes
Task assignment schemes are based on heuristic bin-packing
algorithms where the set of processors are treated as a set of
bins.
The bin-packing problem is concerned with packing
different-sized items into fixed sized bins using the minimum
number of bins .
The existing assignment schemes differ mainly in the choice
of the bin-packing heuristic and the schedulability condition
used.

Partitioning of tasks depends upon the scheduling algorithm


used.
If deadline-driven

scheduling

algorithm is

used,

according to schedulability condition the size of bins is


unity.
If Rate-Monotonic (RM) scheduling algorithm is used,
the size of bins is not fixed but is determined by the
schedulability condition used.

Heuristics Based Schemes for Task


Assignment
Following assignment schemes are based on the next-fit
and first-fit bin-packing heuristics :
Based on RM-Scheduling
o

Rate-Monotonic Next-Fit (RMNF)

Rate-Monotonic First-Fit (RMFF)

Based on DM-Scheduling
o

Deadline-Monotonic Next-Fit (DMNF)

Deadline-Monotonic First-Fit (DMFF)

RM Based heuristics RMNF &


RMFF
These schemes are based on the next-fit and first-fit binpacking heuristic, respectively.
Tasks are sorted in decreasing order of their request rates
before the assignment process starts.

RMNF:
the assignment of tasks starts with an empty processor
and tasks are assigned until the schedulability condition is
not violated.
Otherwise, this processor is marked full and next empty
processor from the system is selected to assign the next
task.
RMFF:
the processors used earlier are first scanned from the
beginning of the list of processors for assignment of the
next task.
if attempt fails then the task is assigned to an empty
processor

The schedulability condition


1 , 2 , , n
Theorem : Let
periods T1 T2 ... Tn.
Let

be a set of n tasks with

u i 1 C i / Ti (n 1)(21 /( n 1) 1)
n 1

If C n / Tn 2(1 u /(n 1)) ( n 1) 1 , then the set can be


feasibly scheduled by the rate-monotonic scheduling
algorithm. As n approaches infinity, the minimum utilization
factor of n approaches (2e u 1) .

Das könnte Ihnen auch gefallen