r-VCPU r-VCPU
rt-VCPU
rt-VCPU nr-VCPU nr-VCPU
SMP RTOS SMP Linux
Core 0 Core 1
rt task
rt task
Figure 2: Using different VCPUs to schedule.
called rt-VCPU is being used for this purpose in the
SPUMONE. This rt-VCPU can give SPUMONE a
hint that this VCPU may contain some important jobs
and has to be run in some degrees of urgency, so
SPUMONE can alter the scheduling algorithm to re-
flect the setting change. For example, in the Figure
2
5
, some tasks which need real-time responsiveness
in the GPOS are bound to some rt-VCPUs and when
they are on the same physical core with r-VCPU,
some scheduling algorithm can be applied to improve
the real-time responsiveness of them.
By using a specific VCPU, rt-VCPU in this case,
to handle specific tasks, this also means that we have
to change those tasks’ CPU affinities either by users
or we have to modify the GPOS in order to get the in-
formation of who is urgent and has to be bound to that
specific VCPU. Here we simply ask users to manually
set the CPU-affinities of their desired tasks to a cer-
tain VCPU. It is also reasonable because users who
want their tasks to run urgently by manually setting
the real-time attribute of them can also easily set the
CPU-affinities according to designer-provided system
manual.
3.2.2 VCPU Operation, Scheduling and
Migration
Scheduling units of SPUMONE are now divided into
three kinds and we have to define the relations among
them and how they interact with each others.
We categorize possible scheduling situations into
three kinds and try to apply some scheduling strate-
gies to further analyze the effect of them:
1. r-VCPUs and nr-VCPUs share a PCPU
6
.
2. rt-VCPUs and nr-VCPUs share a PCPU.
3. rt-VCPUs and r-VCPUs share a PCPU.
In the first situation, it is obvious that r-VCPU is
5
Now a normal VCPU for the GPOS which handles non-
real-time tasks is called nr-CPU and a normal VCPU for the
RTOS is called r-VCPU in order to ease of discussion later.
6
Physical CPU or Physical Core.
the highest priority task for the virtualization layer, if
there is no any rt-VCPU involved which will be dis-
cussed in the situation 3 later. So an r-VCPU can pre-
empt the execution of nr-VCPU anytime it wants and
therefore the deadline of those tasks on the r-VCPU
can be guaranteed. Situation 2 is the same as that
of situation 1. Because rt-VCPU contains real-time
jobs which are critical than normal jobs in the same
system, let the execution of rt-VCPU prior to that of
nr-VCPU is reasonable.
But both situation 1 and 2 have a common issue
which we still need to do more investigations in the
future and it will be discussed in more detail in the
next section.
Situation 3 is the main operation we need to deal
with. Because different systems use different nota-
tions or approaches to assign real-time priority, we
plan to use the method similar in the (Kinebuchi et al.,
2008) to do the global scheduling of rt-VCPU and r-
VCPU. Winner of this scheduling strategy will keep
running its normal execution, but the loser cannot af-
ford idle waiting because either an r-VCPU or an rt-
VCPU is still a critical real-time handling job after
all, otherwise it would make no difference between a
real-time task and a non-real-time one. Luckily, in the
multi-core platform, there are other available comput-
ing resources, PCPUs, for designer to use. Therefore,
we will try to migrate the loser VCPU in this situation
3 to other PCPUs and schedule against the VCPUs
on that target PCPUs using the previous mentioned
strategies, situation 1 and situation 2. However, po-
tential scheduling problem in the RTOS, especially
for SMP RTOS, could also cause serious performance
degradation. We will, again, discuss this issue in the
following section.
4 DISCUSSION: GLOBAL
SCHEDULING ISSUES
Further discussions about some issues while dealing
with global scheduling in the embedded multi-core
virtualization design will be given in this section.
In the situation 1 and 2 mentioned in the previous
section, it is not the problem for most non-real-time
tasks to be preempted by the real-time tasks, but this
is not the case for the system interrupt handling tasks
in the GPOS. Albeit users can selectively change their
jobs’ real-time priority, but they cannot change that of
interrupt handling tasks. So there must be some ways
for the system to help itself not to affect the execution
and real-time responsiveness of them. For example,
in the Figure 3, two tasks in the Linux use two dif-
ferent VCPUs, one uses rt-VCPU and the other uses
PECCS 2012 - International Conference on Pervasive and Embedded Computing and Communication Systems
380