Real-Time Scheduling Policies

The kernel contains the following real-time scheduling policy implementations:

Only one policy can be active at any time. Initially (i.e., during and after boot), the Linux policy is active. You can use the tool showsched (part of liblitmus) to display the name of the currently active policy.

Changing the Active Policy

You can use the tool setsched (part of liblitmus) to select a new plugin at run time. Only root can change the active policy, and only when there are no real-time tasks present.

The script setsched depends on the dialog utility. If you do not have the dialog utility installed, then you can still use setsched by passing the desired scheduling policy as a command line parameter. For example, type setsched PFAIR to activate the PFAIR plugin.

The list of loaded plugins is exported as /proc/litmus/plugins/loaded; the active plugin is reported as /proc/litmus/active_plugin.

Selecting the C-EDF Cluster Size

The C-EDF plugin can create clusters based on the cache topology. When the plugin is activated (see above), it configures clusters based on the value ("L1", "L2", "L3", or "ALL") last written to /proc/litmus/plugins/C-EDF/cluster.

Note that the C-EDF plugin must be reloaded (for example by switching to the Linux plugin and back to C-EDF) to enact a change to the desired cluster size; changing the cluster size while C-EDF is active is not supported.

Writing Real-Time Tasks

The user space library that provides the LITMUSRT API, liblitmus, contains two example real-time tasks (base_task.c and base_mt_task.c) that both illustrate how to use the API and provide a skeleton for real-time task development. To get started with development, please take a look at these example programs.

UserspaceTools (last edited 2012-01-10 16:50:45 by mbk-50-12)