All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Gai <pj@domain.hid>
To: xenomai@xenomai.org
Subject: [Xenomai-help] Newbie question about priorities of xenomai Threads
Date: Sat, 03 Dec 2005 23:07:22 +0100	[thread overview]
Message-ID: <4392171A.9070703@domain.hid> (raw)

Dear all,

My name is Paolo and i am brand new to Xenomai :-)

I downloaded and installed the stable version of Xenomai, 2.0.1. I tried 
a few demos, and some POSIX skin examples: they work just fine :-). Then 
and I started reading the documentation and some code (I have to say it 
is very well done). Sorry if my first questions will be a little bit 
simple and obvious.

I have a first question related to Xenomai Threads priorities and 
scheduling. In particular I refer to the "Common priority scheme" in the 
"Life with Adeos" document. What I understood is the following:

- Xenomai threads have a priority value that is compatible (let's say 
transparent) between the primary and secondary domain.
- Xenomai threads in secondary mode and Linux real time threads (let's 
say those with SCHED_FIFO or SCHED_RR policy) have compatible priority 
values.
- Among the pool of ready Xenomai threads, the Xenomai thread with 
highest priority is scheduled first.
- If the selected xenomai thread is in secondary mode and there is a 
Linux thread with higher priority, the Linux thread is scheduled first.


First example:
---------------------
Suppose that at a rescheduling we have the following thread in the ready 
queues
- High Priority -> Linux thread H
- Medium Priority -> Xenomai thread M in PRIMARY domain
- Low Priority -> Xenomai thread L in primary domain

Then, the Xenomai scheduler will select M, and M will be dispatched.

Second example:
--------------------------
- High Priority -> Linux thread H
- Medium Priority -> Xenomai thread M in SECONDARY domain
- Low Priority -> Xenomai thread L in primary domain

Then, the Xenomai scheduler will select M. but M is in secondary mode, 
which means the Linux kernel will be scheduled. The Linux scheduler 
knows H (it's a linux thread), M (it's in secondary mode), and maybe 
about L (if it has been created by UVMs). The Linux scheduler will 
choose H, and H will be scheduled.

Is that right?

bye

Paolo Gai
http://www.evidence.eu.com



             reply	other threads:[~2005-12-03 22:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-03 22:07 Paolo Gai [this message]
2005-12-04 10:54 ` [Xenomai-help] Newbie question about priorities of xenomai Threads Philippe Gerum

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=4392171A.9070703@domain.hid \
    --to=pj@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.