and processors allocation on-line in order to use more
comprehensiveand up-to-date knowledge of the tasks
and the environment (architecture).
In recent real-time systems also, computation model
has become more and more complex and embedded
systems must operate in dynamic environments where
human activities occur at any moment, then some
tasks, such as emergency task, external event task,
human interaction task (add, removal, update), etc.,
arrive aperiodically and for this reason a reconfigura-
tion scenario ψ
h
must be done at run-time to adapt the
whole system to its environment and to handle all the
user requirements.
The goal of our original approach dealing with the re-
configuration and scheduling of real-time systems is
to construct systems that are guaranteed to meet all
hard deadlines and that minimize the response time
for all soft deadlines (Khalgui, 2010). This a chal-
lenge that has frequently not been met to our knowl-
edge and that we aim to meet it in this work. Indeed,
to obtain this goal, this system should be changed and
automatically adapted to its environment on the oc-
currence of random disturbances such as hardware-
software faults. A random disturbance is defined in
this work as any random internal or external event al-
lowing additions, removals or updates of tasks at run-
time to adapt the system’s behavior. Nevertheless,
when an automatic reconfiguration scenario ψ
h
is ap-
plied, the deadlines of new and old tasks can be vio-
lated. We mean by reconfiguration scenario ψ
h
in this
work, the removal, update or addition of new tasks
when they arrive at run-time without prior knowledge
in order to save the whole system when random dis-
turbances happen at run-time. We define an agent-
based architecture that checks the system’s evolution
and defines useful solutions for users when deadlines
are not satisfied after any reconfiguration scenario ψ
h
.
Two cases of suggestions are possible to be provided
by our intelligent agent: modification of worst case
execution times of tasks and the migration of some
tasks from the corresponding processors to others that
belongs to the inclusion set. We need by inclusion
set in our work, the set of processors in which the
tasks can be scheduled after any reconfiguration sce-
nario ψ
h
when a migration request has done and in
this case all the relevant state information of that mi-
gration is transferred to the new processor. Otherwise,
it is called exclusion set. The users should choose one
of these solutions to re-obtain the system’s feasibility
and to minimize the response time of the soft tasks.
We developed a tool RT-Reconfiguration and tested it
in order to support the agent’s services.
As well as we know, the first optimal approach which
consists in assigning the periodic tasks to the various
processors for each reconfiguration scenario ψ
h
is that
we propose in this original work. It implies a large
number of advantages, in particular to avoid the com-
plexity of multiprocessor scheduling systems, and our
proposed intelligent agent try to achieve this objective
by focusing on evenly balancing the load among the
processors and on reducing response times of the total
task set.
2.1 Approach Description
To explain our approach well, we assume that there
are K identical processors numbered from 1 to K, and
m real-time tasks numbered from 1 to m that com-
posed a feasible subset of tasks entitled ξ
old
and need
to be scheduled. At time t and before the applica-
tion of the reconfiguration scenario ψ
h
, each one of
the tasks of ξ
old
is feasible, e.g. the execution of each
instance in each processor is finished before the cor-
responding deadline and the tasks are not assumed to
be arranged in any specific order.
Each processor p assigns a set of periodic tasks TS
p
= {τ
p
1
, τ
p
2
,...,τ
p
n
}. This allocation is made with an al-
lowance algorithm at the time of the design. These
tasks are independent and can be interrupted at any
time. Each task τ
p
i
has an execution time (Worst Case
Execution Time) C
p
i
, one period T
p
i
, a deadline D
p
i
which is assumed to be less than or equal to its period,
e.g. D
p
i
≤ T
p
i
. Each task instance k has to respect its
absolute deadline, namely the k
th
authority of the task
τ
p
i
, named τ
p
i,k
must be completed before time D
p
i,k
=
(k-1)T
p
i
+ D
p
i
. Each processor p will execute its lo-
cal tasks by using EDF, it means that the priorities P
p
i
of periodic tasks are dynamic and the scheduler guar-
antees that every instance of every task will run be-
fore its deadline. These tasks are handled by a global
scheduler (GS), which assigns them to processors by
using the state informations of the local schedulers.
Moreover, under EDF scheduling, a task will fit on a
processor as long as the total utilization of all tasks
assigned to that processor does not exceed unity (the
total utilization factor = 1). Finally, for reasons of
simplicity, we assume that all the overheads of con-
text exchange, scheduling of tasks, the preemption of
the tasks and the migration cost of the tasks are equal
to zero.
We assume now the arrival at run-time of a second
subset ξ
new
which is composed of n real-time tasks at
time t
1
(t
1
= t + ∆t). We have a system Current
Sys
(t
1
)
composed of m + n tasks. In this case a reconfigu-
ration scenario ψ
h
is applied. The reconfiguration of
the system Sys
ψ
h
means the modification of its imple-
mentation that will be as follows at time t
1
:
PreemptiveHardReal-timeSchedulingofReconfigurableOSTasksonMultiprocessorsEmbeddedControlSystems
193