L4 Timer User Manual
Mainpage file doc/timer.dox
The L4 timer server provides support for short timeouts. An L4 thread can sleep for a defined amount of time using the l4_sleep system call (that is, receive IPC from L4_NIL_ID specifying a timeout). However, the L4 kernel scheduler is activated with a frequency of 1000Hz. The shortest period a thread can wait is therefore at least 1 millisecond. Finer granular timeouts need support for userland, for example the timer server.
Timer consists of two main parts, the Timer server (
timer) and the timer client library (
libtimer.a).
The timer server depends on the name server names, the logging server log, and a dataspace manager (e.g. dm_phys). The L4 kernel infopage must contain the frequency of the CPU (field frequency_cpu) and the frequency of the Local APIC (field frequency_bus). When using Fiasco, this can be achieved using the kernel command line parameter -apic.
Example grub boot menu entry:
module = (nd)/tftpboot/names
module = (nd)/tftpboot/log
module = (nd)/tftpboot/dm_phys
module = (nd)/tftpboot/timer
For most purposes, starting timer without any arguments should be sufficient. Possible command line arguments are:
-b | --bench
- Measure the access time for the Local APIC memory mapped I/O registers.
-i | --irq=number
- Specify the IRQ vector used for the Local APIC timer. Default is 8.
-l | --latency
- Measure the Local APIC timer interrupt latency.