L4Linux 2.4 server priority

Adam Lackorzynski adam at os.inf.tu-dresden.de
Tue Jul 12 19:00:44 CEST 2005

On Tue Jul 12, 2005 at 16:00:48 +0200, Leon Brits wrote:
> I have some questions with regard to the priority of a L4Linux server:
> Q1: In my loader script I set the "priority" parameter to what some help
> file somewhere (I think on the website) showed namely 0xA0. When I do a
> l4lx_thread_prio_get inside a kernel module I get the value "100".
> Is the loader "priority" parameter hex or decimal? [0xA0 -> 100 ????]

If it's 0xa0, it's hex obviously. The thing is that you're looking at
two different threads. The start thread, which the loader is starting is
running at prio 0xa0/160 but the thread you're running
l4lx_thread_prio_get in is running at prio 0x64/100.

> Q2: If I set the "priority" parameter of a second L4Linux server to 0x30
> I also get 100. Does this parameter actually work? - if not where is
> "100" defined?

I suppose the start threat runs at prio 0x30 then but the other threads
get their prio explicitely set. So that's why there's no difference.

Please check with 'lp' in the kernel debugger.

> Q3: The API call l4lx_thread_prio_get() actually fails when the module
> loads complaining about exported symbols, while l4lx_thread_create()
> which is defined in the same header file (thread.h) and in the same
> source file (thread.c) works fine. Can somebody please help me
> understand this!?

In Linux symbols have to be explicitely exported to be usable in
modules. Please have a look at arch/l4/kernel/l4_ksyms.c

> Q4: In the L4Linux server the kernel's priority is set based on a define
> named PRIO_KERNEL which is defined as 127. How does this PRIO_KERNEL
> defined value (and other PRIO_* values) relate to the "priority"
> parameter.

See above.

Adam                 adam at os.inf.tu-dresden.de
  Lackorzynski         http://os.inf.tu-dresden.de/~adam/

More information about the l4-hackers mailing list