ponent instances have ports that can send and receive
typed messages. Connector instances connect ports
and have Quality of Service (QoS) assumptions like a
maximum transmission time. For example, the over-
taker sends the messages request and finished to the
overtakee and can receive the messages accept or de-
cline from the overtakee. Based on the QoS assump-
tions, the model checking assumes that messages are
transmitted within 100ms. Furthermore, component
instances can be connected to continuous component
instances that represent sensors and actuators of the
CPS. For the reason of comprehensibility, we omit
these components in the diagram.
The component’s behavior is specified in terms
of Real-time Statecharts (RTSCs) which combine
UML state machines (OMG, 2011) and timed au-
tomata (Alur and Dill, 1994). Figure 3 shows the be-
havior of component instance overtakee. RTSCs can
be composed of so-called regions that again contain
state machines. For instance, CommunicatorRTSC is
composed of the regions communicator and internal.
The region communicator represents the behavior of
the communication with the overtaker and is com-
posed of the states init, overtaking, and requested. The
region internal represents the internal behavior of the
component instance that takes the decision whether
the overtaking is safe or not and is composed of the
states safe, unsafe, and in progress. RTSCs may share
variables (e.g., velocity in region internal) and have
clocks that measure the time and can be reset to zero
within the statechart, e.g., timeout in the region com-
municator. Furthermore, each RTSC has exactly one
currently active state. A state may contain an invari-
ant as a real-time property, which restricts the value
of the clock when the state is active. It must be guar-
anteed during runtime that an invariant is never vio-
lated, e.g., the state overtaking has to be left before the
clock timeout reaches 50ms. A transition may have a
guard ([velocity > 100]) , time constraints ([timeout >
25]), a trigger message (trigger /), and a synchroniza-
tion channel that restricts the firing (sender channel!
/, receiver channel? /). It is enabled, i.e., it is able to
fire, if its source state is active, its guard evaluates to
true, its time constraint evaluates to true, and its trig-
ger message is stored within the buffer. Furthermore,
some transitions are connected with each other via
synchronization channels; the transition from the state
requested to the state overtaking in region communi-
cator is synchronized with the transition from state
safe to overtaking in region internal via the synchro-
nization channel safe. Thus, these transitions may
only fire jointly.
We assume that RTSCs are executed step-wise,
i.e., in each step the outgoing transitions of the cur-
rently active state (and all synchronized transitions)
are evaluated. If a transition is enabled, the transition
with the highest priority fires and the currently acti-
vate state gets updated.
3 SEGMENTATION AND
ALLOCATION
In this section, we explain our proposed approach for
segmentation and allocation in more detail. We as-
sume that models for the PIM are already created and
requirements are verified using model checking (cf.
BPMN Task 1, Figure 1). The remainder of this sec-
tion is structured by following the development pro-
cess as shown in Figure 1.
3.1 Segmentation into Runnables
The segmentation defines which part of the software
models are mapped to a runnable. Runnables are the
smallest unit that can be executed by the system and,
therefore, segmenting the PIM into runnables affects
the behavior execution on the target platform directly.
Additionally, WCET, period, and deadline are defined
for each runnable. This step is crucial for seman-
tically correct execution because an invariant might
be violated if a runnable is executed too late. Thus,
the segmentation has to fulfill the following require-
ments. R1: The segmentation has to allow parallel
execution. Multi-core environments increase the per-
formance of a system by using parallelization. There-
fore, software has to be separated into runnables that
can be executed in parallel. R2: We aim to generate
as few runnables as possible without degrading the
possibility of parallel execution because with an in-
creasing number of runnables, the complexity of the
partitioning step also increases, which makes it more
difficult to find a feasible scheduling and may lead to
a decrease in the performance of the system.
R3: Real-time requirements must be fulfilled at
runtime. On PIM level, model checking techniques
are used to ensure the fulfillment of these require-
ments at design time. Executing the software on a
platform adds further parameters that have not been
considered during the verification step on PIM level,
e.g., the activation due to the concrete scheduling.
Thus, a requirement for the resulting scheduling is to
ensure that the semantics of the PIM are respected.
In a first step, MUML software models have to be
split into runnables. RTSCs of the software architec-
ture are the starting point for the segmentation. The
segmentation directly adresses the first and second re-
quirement because it defines which parts of the soft-
Towards an Automated Synthesis of a Real-time Scheduling for Cyber-physical Multi-core Systems
287