Skip to contentSkip to conversation

events and domains

Xenomai-help Giuseppe Lipari 2 participants 2 messages Dec 13, 2005

lore
Share & tools
lore
#0 lore raw

Dear all,

We are new to Xenomai and Adeos. We have some questions and I could not find answers to these in the documentation (but maybe we are not very good at finding things!). We hope someone can help!

1) Adeos is able to handle events that are passed to domains. I understand that events are hw interrupts and "other things". In the docs, I see that an event can be a "soft interrupt". As soft interrupt can have different meanings in different contexts, what do you actually mean with "soft interrupt"??

2) Also, what exactly are hooks? In particular, when there is a context-switch between two non-Xenomai (Linux) threads running in user space, is any hook-event generated?

3) when a Xenomai thread starts executing, does it start in primary or in secondary mode?

4) is the memory of a Xenomai thread allocated in user space? (I guess yes, but just to be sure!)

5) if two UVMs are active at the same time, how they are scheduled with respect to each other? (I guess SCHED\_FIFO, but it looks somewhat strange to me: why not SCHED\_RR, at least for the application tasks?).

Giuseppe Lipari and Paolo Gai

Signature · 7 lines
------------------------------------------------------
| Prof. Giuseppe Lipari      |
| RETIS Lab                  |
| Scuola Superiore Sant'Anna | tel:   +39 050 882030
| via G. Moruzzi, 1          | fax:   +39 050 882003
| 56124 Pisa (PI)            | email: [email protected]
------------------------------------------------------
#1 lore raw
Quoted 6 lines · Giuseppe Lipari

Dear all,

We are new to Xenomai and Adeos. We have some questions and I could not find answers to these in the documentation (but maybe we are not very good at finding things!). We hope someone can help!

Quoted 6 lines

1) Adeos is able to handle events that are passed to domains. I understand that events are hw interrupts and "other things". In the docs, I see that an event can be a "soft interrupt". As soft interrupt can have different meanings in different contexts, what do you actually mean with "soft interrupt"??

Virtual interrupts (virq) actually. Pseudo-IRQ channels that are not mapped to real hardware but rather allocated by software to propagate software-generated events. For instance, Xeno uses a virq for carrying out asynchronous procedure calls from the primary to the secondary domain (see /proc/xenomai/apc).

Quoted 4 lines

2) Also, what exactly are hooks? In particular, when there is a context-switch between two non-Xenomai (Linux) threads running in user space, is any hook-event generated?

Hooks == callbacks. Yes, Xeno uses this to track and monitor what the hell Linux is doing at any time wrt user-space tasks mapped to shadow Xeno threads. In nucleus/shadow.c, see do_schedule_event().

Quoted 3 lines

3) when a Xenomai thread starts executing, does it start in primary or in secondary mode?

Primary, always. It's written in stone.

Quoted 3 lines

4) is the memory of a Xenomai thread allocated in user space? (I guess yes, but just to be sure!)

No difference from regular Linux threads. Actually, a Xenomai thread running in user-space is a Linux thread on steroïd. To this end, what we call a shadow thread context is mapped to the initial Linux task context, so that the Xenomai scheduler can handle it too, in parallel to the regular Linux scheduler (in a mutally exclusive fashion though).

Quoted 4 lines

5) if two UVMs are active at the same time, how they are scheduled with respect to each other? (I guess SCHED\_FIFO, but it looks somewhat strange to me: why not SCHED\_RR, at least for the application tasks?).

It's explained in the "Introduction to UVMs" document.

Quoted 5 lines

Giuseppe Lipari and Paolo Gai

Signature · 1 line
Philippe.