[FrontPage]

This page serves to collect frequently asked questions and corresponding answers. Please ask questions that are not answered here on the mailing list (and augment this list afterwards).

FAQ

I would like to write a real-time application that uses the LITMUSRT API. Where should I start?

Have a look at the task bin/base_task.c in the liblitmus repository. It's a documented task skeleton that shows how to implement a periodic or sporadic real-time task.


Can I use pthreads with LITMUSRT?

Yes. An example for a multithreaded real-time application is provided in bin/base_mt_task.c in the liblitmus repository.


I tried booting with one of the provided kernel configurations on my hardware, but the kernel kernel hangs during boot with the following message: "kernel panic not syncing vfs unable to mount root fs on unknown-block (0,0)". What's wrong?

This is a generic Linux problem, not a LITMUSRT problem. The configuration is missing support for your root device and/or your root file system. To boot LITMUSRT on your machine, you first need to have working configuration for an unmodified Linux kernel. Once you have mainline Linux working your machine, LITMUSRT should boot without problems as well.


When testing with kvm using -nographic, the system appears to hang where normally a "login:" prompt would appear. However, I can log in via ssh. How can I enable local logins?

Your Linux distribution is not spawning a shell for the console. On distributions using /etc/inittab, you need to edit the inittab file to spawn a login process for console. Some distributions (such as Ubuntu and RedHat), do not use inittab. Instead, you must create a file named ttyS0 in /etc/events.d. Here is an example /etc/events.d/ttyS0 that works in Ubuntu 8.04:

start on runlevel 1
start on runlevel 2
start on runlevel 3
start on runlevel 4
start on runlevel 5

stop on runlevel 0
stop on runlevel 6

respawn
exec /sbin/getty -L 19200 ttyS0 vt102

Note that RedHat systems may use /sbin/agetty instead of /sbin/getty.


I am trying to boot a virtual test system in kvm, but I get the following error message (repeatedly).

hda: possibly failed opcode: 0x39
hda: task_pio_intr: status=0x41 { DriveReady Error }
hda: task_pio_intr: error=0x04 { DriveStatusError }

What is causing this?

This error message can occur if kvm cannot write to the image file that is backing hda. Check the file permissions.


I attempted to run liblitmus/rtspin, and got the following error

could not setup rt task params: Function not implemented

This error is caused when your liblitmus build is out of sync with your LITMUSRT kernel build. Recompile LITMUSRT followed by liblitmus to fix the problem.


I've followed the build instructions on the wiki, but the compilation fails. Why am I getting errors such as the following about request_exit_np_atomic()?

litmus/sched_plugin.c:85:4: error: implicit declaration of function ‘request_exit_np_atomic’ [-Werror=implicit-function-declaration]

This error is due to a typo in LITMUS^RT 2012.1 in include/litmus/litmus.h. This has been fixed in commit 6a00f206debf8a5c8899055726ad127dbeeed098. As a workaround, enable CONFIG_NP_SECTION in the kernel configuration.


What is the purpose of the linked and scheduled pointers in struct pfair_state and struct cpuentry_t in sched_pfair.c and sched_gsn_edf.c, respectively?

The linked pointer represents what "should" be scheduled, while the scheduled is the real-time task that "is" scheduled. The difference arises because it takes some time to switch away from the stack of the currently scheduled process when a preemption occurs.


I've recorded kernel overheads as described in the tracing tutorial. How should I account for these overheads during schedulability analysis?

This is described in detail in Chapter 3 of Björn Brandenburg's dissertation.


I have activated the GSN-EDF scheduler and then launched the base_task: ./rt_launch 10 100 ./base_task. Why am I getting the error sporadic_global(EXEC_COST, PERIOD) failed: Device or resource busy?

The tool rt_launch exists to launch arbitrary, non-real-time binaries as real-time tasks under LITMUS^RT. Tasks that link directly against liblitmus (such as base_task) transition to real-time mode themselves and thus do not need to be launched with rt_launch.

The specific error is due to the fact that base_task attempted to set its period and execution cost while it was already a real-time task (since rt_launch transitions to real-time mode before forking and exec'ing the specified binary). Parameter changes at runtime are currently not supported in the stock LITMUS^RT version.


Using QEMU/kvm, the kernel panics during boot with the following message:

ACPI: Core revision 20110413
..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1
..MP-BIOS bug: 8254 timer not connected to IO-APIC
...trying to set up timer (IRQ0) through the 8259A ...
..... (found apic 0 pin 2) ...
....... failed.
...trying to set up timer as Virtual Wire IRQ...
..... failed.
...trying to set up timer as ExtINT IRQ...
..... failed :(.
Kernel panic - not syncing: IO-APIC + timer doesn't work!  Boot with apic=debug and send a report.  Then try booting with the 'noapic' option.

This is a known mainline Linux problem. The code that checks whether timers are accurate enough may fail to find an acceptable timer in virtualization environments. To suppress this, boot with the no_timer_check option.


I'm trying to use Feather-Trace and/or sched_trace, but I'm getting an error like could not open feathertrace device (/dev/litmus/sched_trace13): No such file or directory. How do I enable Feather-Trace?

You need to enable Feather-Trace in the kernel configuration (e.g., using make menuconfig). It's off by default. To see the Feather-Trace option, you need to first disable the CONFIG_RELOCATABLE option, which conflicts with Feather-Trace. (See also: http://stackoverflow.com/questions/22993077/litmus-rt-scheduling-traces)


Imprint/Impressum | Data Protection