Using KVM for Hierarchical Scheduling

This package contains the scripts and programs used to perform experimental validations for the paper "Hierarchical Scheduling of Real-Time Tasks over Linux-based Virtual Machines".

The source code can be downloaded from and uncompressed with tar xvf rtvm.tgz.

Scripts to Start KVM-based VMs

The "Scripts" directory contains some shell scripts that can be used to start kvm-based VMs, and to schedule their vCPU threads with the SCHED_FIFO or SCHED_DEADLINE policy:

Scheduling Tasks with the SCHED_DEADLINE Policy

The "chdl" directory contains the "chdl" C program, used to schedule with SCHED_DEADLINE an existing process. It received the pid of the process as a first argument, the SCHED_DEADLINE runtime (in microseconds) as a second argument, and the SCHED_DEADLINE period (in microseconds) as a third argument. This program is used by the "" script.

MPR Analysis

The "MPR-Analysis" directory contains a C program used to design an MPR interface for a given taskset. This "mpr_sched" program receives

Partitioning the Guest Tasks

The "Part" diretory contains the partitioning tool. To compile it, go to the "Part/src" directory and type "make". The toolis based on the CPLEX libraries; if CPLEX is not installed in the standard location, use make CPLEX=<path to CPLEX>

Running some Experiments

The "Workload directory" contains the code and scripts used to run a workload composed by periodic real-time tasks in a component inside a kvm-based VM. The scripts to be invoked by the user are in "Workload/HostScripts":

All the "run_*.sh" scripts work by generating an initramfs for the VM, containing the guest code to be executed to run the experiments (and an init script that automatically runs the experiments, after mounting the output directory via virtfs). The initramfs is populated by using busybox and the periodic_thread program from PeriodicTask