old messages to be exchanged between old removed
tasks after a particular reconfiguration. In this pa-
per, we assume a system to be composed of n micro-
controllers which are linked by CAN. A multi-agent
architecture following the master/slave model is de-
fined to control the feasibility in the whole system
after the addition of messages. For that, three types
of agents are defined: 1) A master Agent Ag
CAN
: is
proposed to check the feasibility in CAN 2) A main
slave agent Ag
i
: is controlled by Ag
CAN
and defined
for each microcontroller to verify the feasibility of
its OS tasks after any reconfiguration scenario and
3) A second slave agent: Ag
frame
: its role is to de-
fine the new messages to be loaded in packets after
any reconfiguration scenario. A protocol communi-
cation between these agents is described. If a recon-
figuration scenario is required by a particular main
slave Ag
i
(i ∈ [1, n]) in the corresponding microcon-
troller and if this scenario affects the traffic of the
network (e.g. adds-removes or modifies the packets
on the network), then Ag
CAN
should be notified in or-
der to coordinate with the rest of microcontrollers. If
all the concerned microcontrollers accept this require-
ment, Ag
CAN
gets from them an acceptation signal
before authorizing Ag
i
to effectively apply this sce-
nario. In this case, the slave agent Ag
frame
should
adapt the frame packing to this scenario by removing
from CAN the old messages which are sent from old
tasks to be removed,and adding to CAN the new mes-
sages of the new added tasks. To guarantee a feasible
distributed system after any reconfiguration scenario,
we propose new technical solutions that can modify
the parameters of tasks such as deadlines, periods, ac-
tivation/deactivation of microcontrollers. Moreover,
we propose a new strategy to solve the problem of dy-
namic frame-packing by developing a new algorithm.
We suggest the bin-packing to locate the messages
into the different frames. These solutions are dealing
with the reconfiguration of microcontrollers and also
CAN are applied of three hierarchical levels: 1) Tasks
Level: the main slave agent Ag
i=1..n
in each micro-
controller verifies the feasibility of the whole system,
i.e, the utilization of each microcontrollermust be less
than/equal to 1, 2) CAN Bus Level: Ag
CAN
controls
the real-time constraints of the exchanged messages,
i.e, the bus utilization must be less than/equal to 1 and
3) Middleware Level: the second slave agent Ag
frame
constructs the dynamic frame packing with the mini-
mization of the bandwidth. The didactics multiplexed
vehicle of the INSAT institute is selected as a case
study throughout this paper and a tool is developed
at LISI laboratory in order to support the different
proposed solutions. The remainder of the paper is
as follows. Section 2 exposes some related works.
The case study is described in Section 3. Section 4
presents the multi-agent architecture which is imple-
mented and simulated in Section 5. We finish by a
conclusion in Section 6.
2 BACKGROUND
This section introduces some basic terms and con-
cepts which are used throughout this paper.
2.1 Real-time Characteristics
A real-time system can be composed of periodic, ape-
riodic and sporadic tasks. In this research, we are just
interested in periodic and/or aperiodic tasks. Each
periodic task is characterized by (Liu and Layland,
1973): (1) A release time R : It is the time when a
job becomes available for execution. We assume that
the tasks are synchronous, i.e, R = 0, (2) period T:
is the regular inter−arrival time, (3) deadline D: the
absolute deadline is equal to the release time plus the
relative deadline, (4) WCET C: is the time needed to
compute a job. and (5) static priority S: The highest
static priority which is equal to 1, i.e., S
i
= 1 repre-
sents τ
i
with the highest static priority. For aperiodic
tasks, we denote by d, WCETs c and r the deadlines,
the worst case execution times and the release times,
respectively. The aperiodic tasks arrive according to
the poisson distribution with the parameter λ
C
and
are executed according to the exponential distribu-
tion with the parameter λ
r
(I. khemaissia and Bouza-
yen, 2014). The aperiodic tasks can be with soft/hard
deadlines, i.e, the missing of the soft deadlines is ac-
ceptable and it is not the case for the hard deadlines.
According to (I. khemaissia and Bouzayen, 2014), the
microcontroller utilization U
bef
before a particular re-
configuration is calculated as follows:
U
bef
= U
per
+U
ape
(1)
Where:
• The microcontroller utilization of periodic tasks
U
per
=
n
∑
i=1
m
∑
j=1
C
i, j
T
i, j
. n and m represent the number
of the microcontrollers and the tasks respectively,
• The microcontroller utilization of aperiodic tasks
U
ape
=
n
∑
i=1
λ
ri
λ
Ci
.
We assume that the aperiodic tasks arrive with the
same rates in all the microcontrollers. To guarantee
the feasibility of the system before any reconfigura-
tion scenario, the followingcondition must be verified
for each microcontroller (Liu and Layland, 1973):
U
bef
≤ 1 (2)
ICINCO2014-11thInternationalConferenceonInformaticsinControl,AutomationandRobotics
356