From: Jan Kiszka <jan.kiszka@domain.hid>
To: "Brian L." <bluczkie@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] General question on Native Skin tasks
Date: Tue, 18 Apr 2006 23:04:49 +0200 [thread overview]
Message-ID: <44455471.8090001@domain.hid> (raw)
In-Reply-To: <6ee4c8380604181253t235363a9v79d91b57bea4575a@domain.hid>
[-- Attachment #1: Type: text/plain, Size: 2309 bytes --]
Brian L. wrote:
> Ok; What xenomai priority in the 1-99 scheme corresponds to the
> priority of normal user-level posix threads?
Depends on the mode of your xenomai thread: when in primary mode (the
hard-rt mode where the xeno threads live by default), those 99 levels
are actually above all linux priorities.
But when your thread enters secondary mode to issue some linux syscall
or handle a normal signal, its priority gets mapped 1:1 on the linux
range. This means, e.g., that a xenomai thread with prio 50 in secondary
mode gets overruled by a normal linux thread with prio 60 but not by a
xenomai thread in primary mode even with prio 1.
>
> The application I'm building has realtime and non-realtime components
> which share some native-skin objects. I am constructing my
> time-critical and non-time-critical threads using rt_task_create. I
> would like almost all of them to behave exactly as ordinary
> non-xenomai posix threads do with regard to priority and starvation.
Why do you create the non-rt threads also via rt_task_create? This just
introduces unneeded load on the RT subsystem.
>
> The example was contrived to support my question. In practice, I do
> call mlockall. Also, my development machine has no swap space, so
> mlockall probably shouldn't have an effect.
I does, thanks to the lacy memory allocation scheme of glibc (alloc on
access).
>
> What does this watchdog do and where is it documented? I'm surprised I
> haven't heard it mentioned before, since it seems rather important.
It's a kernel option (isn't it mentioned somewhere in the docs? then it
needs fixing).
The scheme is that after 4 seconds (if I remember the number correctly)
of continuous xenomai activity with linux leaving no breath, the
currently running xenomai thread gets suspended. This may be the wrong
one when you are unlucky, but then one of the next round will hit the
offender. We may think about improving this scheme a bit (suspending the
lowest-prio thread?). I helps to return your system to "interactive
mode", analysing what went wrong and maybe cleaning it up.
>
> So far, I've not intended to introduce any "real-time" features; What
> I'm doing is very vanilla stuff that I'd normally do with pthreads.
>
> Brian
>
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]
next prev parent reply other threads:[~2006-04-18 21:04 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-16 18:10 [Xenomai-help] General question on Native Skin tasks Brian L.
2006-04-17 13:33 ` Jan Kiszka
2006-04-17 14:50 ` Philippe Gerum
2006-04-17 17:35 ` Philippe Gerum
2006-04-17 20:03 ` Jan Kiszka
2006-04-17 20:44 ` Jan Kiszka
2006-04-18 19:53 ` Brian L.
2006-04-18 21:04 ` Jan Kiszka [this message]
2006-04-19 15:27 ` Brian L.
2006-04-19 17:18 ` Jan Kiszka
2006-04-19 17:42 ` Brian L.
2006-04-19 19:45 ` Jan Kiszka
2006-04-20 3:09 ` Li Yi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=44455471.8090001@domain.hid \
--to=jan.kiszka@domain.hid \
--cc=bluczkie@domain.hid \
--cc=xenomai@xenomai.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.