• No results found

3.5 Summary

4.1.2 Virtual Machine Model

A virtual machine Vk is modeled as a set Ω(Vk) of tasks and the task scheduling policy σ(Vk) that is applied by the guest operating system. Notation τi ∈ Ω(Vk) denotes that task τi is executed in Vk. The utilization of a VM is the sum of the utilizations of its tasks, implying that operating system overhead is neglected:

U (Vk) = P

τi∈Ω(Vk)U (τi). Independent VMs are assumed, with neither shared re-sources except for the processor (static and exclusive allocation of memory regions), nor data dependencies, nor inter-VM communication.

Many characteristics of the task model apply to the virtual machine model as well. A criticality level χ is assigned to each VM. If a VM’s task set is characterized by multiple criticality levels, the highest criticality level determines the criticality of the VM. The assignment of criticality on VM level is no restriction, since our use case deals with the consolidation of already certified systems.

Virtual machines can have multiple mutually exclusive operational modes. Modes differ regarding the set of tasks: which tasks are executed (and not disabled) and in which mode are they executed? Analogous to task modes, each VM mode produces a different behavior or delivers a different quality of service, and is characterized by a differing resource demand (processor utilization). Entire VMs can be disabled and enabled as well.

From the point of view of the hypervisor, we consider VMs to be schedulable entities that can be represented comparably to the task model. Since the task set executed by a VM is characterized by varying execution times, the same is true for the VM itself. The actual execution time within a specific period is in the range of a best-case and a worst-case execution time with an unknown probability distribution.

The best case occurs if all jobs of the VM’s tasks within the VM period execute for their BCET; the worst case occurs if all jobs execute for their WCET. In the usual case of an arbitrary distribution of the jobs’ execution times, the actual execution time of the VM lies in between this range.

For the hypervisor’s VM scheduling, each VM Vk will be abstracted as a task that requires a minimum computation bandwidth Umin(Vi) to carry out the timely execution of its internal task set Ω(Vi). However, it may benefit in terms of a higher quality of service from additional bandwidth, if available, up to Ulax(Vi) ≥ 0. The required minimum utilization Umin(Vi) and the maximum extra bandwidth Ulax(Vi) are dependent on the task set Ω(Vi) and on the task scheduling policy σ(Vi) and derived in the context of the periodic resource model design (Section 4.2).

The demand bound function computes for a time interval of length t starting at

an arbitrary point in time t0 the total computation time demand of a task, i.e., the sum of the execution times of all jobs with arrival time and deadline in [t0+t]. It was introduced by Baruah, Rosier, and Howell [Baruah et al., 1990] and is also known as processor demand criterion [Buttazzo, 2004]. This abstraction is adapted in the context of this work in order to summarize the computation time demand of a VM:

Definition 13. The Demand Bound Function dbfσ(Vi, t) denotes for any time interval [t0, t0 + t] (t0 ≥ 0, t > 0) the maximum cumulative execution time demand of a periodic task setΩ(Vi) under a scheduling algorithm σ.

The temporal characteristics of a guest system are summarized in terms of this function. It is an interface that contains information about the computational re-source demand and is later used in order to design and analyze a system that inte-grates multiple VMs. The correct integration of multiple real-time systems is only possible if such a temporal interface extends the functional interface of a component.

The demand bound functions for Earliest Deadline First (EDF) as an optimal dynamic priority assignment and Rate Monotonic (RM) as an optimal static priority assignment [Liu and Layland, 1973b] are for example given as:

dbfEDF(Vi, t) = X than τk, i.e., Tl < Tk. The sum computes the interference caused by the computation times of all jobs of higher-priority tasks released before t. In case of EDF, there are exactly j

t

Tkk invocations of task τk. In case of RM, l

t

Tlm denotes the worst-case number of interferes.

In case of RM, the demand bound function has to be denoted for each task on its own, since the exact schedulability test that is later performed (see Section 4.3) is based on the computation of the worst-case response time for each task. Since we use the demand bound function as a scheduling interface, information that is required for the schedulability test must be included. It is not possible to derive a single function for the entire task set, as observed by Shin and Lee [Shin and Lee, 2008]. Instead, dbfRM(Vi, t)is the set of all task-specific demand bound functions:

dbfRM(Vi, t) ={dbfRM(Vi, t, τk)|τk∈ Ω(Vi)} .

4.1 Workload Model 75

0 2 4 6 8 10

2 4 6 8 10

t

demandbound

0 2 4 6 8 10

τ1

τ2

Figure 4.2: Demand bound function for two EDF-scheduled tasks τ1 = (T = 2, C = 1), τ2 = (T = 5, C = 2) (the dashed line depicts the schedulability bound on a dedicated processor)

Figure 4.2 depicts schedule and the demand bound function for an exemplary task set with two tasks, scheduled by EDF. In case of EDF, a task set is schedulable if the sum of the demand bound functions dbf(t) of all tasks is smaller than or equal to t for all t ≥ 0, illustrated by the dashed line with slope 1 through the origin.

Summing up, a virtual machine is characterized by a set of 6-tuples, in which each tuple defines a mode (M1, ..., Mm indicate different modes of the enabled VM, of f refers to the disabled mode):

Vi ==def {Viof f = (Ω(Vi), σ(Vi), dbfσ(Vi, t), χi, Ulax(Vi)of f = 0, w(Vi)of f = 0), ViM1 = (Ω(Vi), σ(Vi), dbfσ(Vi, t), χi, Ulax(Vi)M1, w(Vi)M1),

ViM2 = (Ω(Vi), σ(Vi), dbfσ(Vi, t), χi, Ulax(Vi)M2, w(Vi)M2), ...

ViMm = (Ω(Vi), σ(Vi), dbfσ(Vi, t), χi, Ulax(Vi)Mm, w(Vi)Mm)} , where

• Ω(Vi) is the task set,

• σ(Vi) is the task scheduler,

• dbfσ(Vi, t)is the demand bound function,

• χi∈ {LO, HI} is the criticality level,

• Ulax(Vi)∈ [0, 1] is the utilization laxity,

• w(Vi)∈ [0, 1] is a weight.

Ulax and w differ for each mode (in addition, Cof f = 0 and wof f = 0), the other attributes are mode-independent. This model is the scheduling interface of the virtual machine, which has to be known to the system designer for the correct integration of the guest system.

Summary. A virtual machine is modeled as a task set and the scheduling pol-icy applied to schedule it. A demand bound function summarizes the computation time demand and is used as an interface for temporal requirements. The virtual machine model derives many characteristics from the task model: it includes modes, a criticality level, varying execution times, and an elastic utilization defined by a utilization minimum and a utilization laxity.