All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-help] Newbie question about priorities of xenomai Threads
@ 2005-12-03 22:07 Paolo Gai
  2005-12-04 10:54 ` Philippe Gerum
  0 siblings, 1 reply; 2+ messages in thread
From: Paolo Gai @ 2005-12-03 22:07 UTC (permalink / raw)
  To: xenomai

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



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-12-04 10:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-03 22:07 [Xenomai-help] Newbie question about priorities of xenomai Threads Paolo Gai
2005-12-04 10:54 ` Philippe Gerum

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.