"Adaptive Quality of Service Architecture"
(for the Linux kernel)

The AQuoSA API for the IRMOS real-time scheduler

2010-07-27

In the context of the IRMOS European Project (Interactive Real-Time Applications on Service-Oriented Infrastructures), a new real-time scheduler for Linux has been developed by the Real-Time Systems Laboratory of Scuola Superiore Sant'Anna. However, one of the problems of this new scheduler is that its user-space / kernel-space interface is based on the cgroup filesystem. This makes programming real-time applications willing to exploit the new scheduler functionality quite cumbersome: in order to create new reservations, folders need to be created in the cgroup filesystem; for setting scheduling parameters, numbers need to be formatted and written to cgroup entries; for reading them, cgroup entries need to be read back and parsed; etc.

Furthermore, for example when changing both scheduling parameters (runtime and period), operations need to be carried out in a proper order which depends on the previous values of the parameters, otherwise the admission control logic may reject one of the intermediate steps.

Therefore, the AQuoSA API has been implemented on top of the IRMOS real-time scheduler, for the purpose of abstracting all of these details, and allowing developers to simply focus on what is needed from the kernel.

For example, the following C code segment shows how to create a cgroup reservation of 10 ms every 100 ms, and attach it the current task.

#include <aquosa/qres_lib.h>

qres_params_t params = {
.Q = 10000,
.Q_min = 10000,
.P = 100000
};
qres_sid_t sid;
if (qres_create_server(¶ms, &sid) != QOS_OK)
exit(-1); /* Error */

qres_attach_thread(sid, getpid(), gettid());
/* Here we have real-time guarantees from the scheduler */

qres_destroy_server(sid);
/* Here no more guarantees */

Furthermore, this adaptation layer allows for using the new scheduler with other AQuoSA related tools, like qres. For example, the operations shown above can be realised with the following commands:

qres create q=10000 q-min=10000 p=100000
qres attach sid=1 tid=1421
qres detach sid=1 tid=1421
qres destroy sid=1

Latest news

2010-08-04
The IRMOS Real-Time Scheduler on lwn.net

2010-07-03
New real-time SMP scheduler (IRMOS)

2010-05-30
About page added to website

2009-11-25
Papers page added to website





Last update:
August 4, 2010