A Dijous, 20 de febrer de 2014, Gilles Chanteperdrix va escriure: > On 02/20/2014 11:09 AM, Leopold Palomo-Avellaneda wrote: > > A Dijous, 20 de febrer de 2014, Gilles Chanteperdrix va escriure: > >> On 02/20/2014 12:41 AM, Leopold Palomo-Avellaneda wrote: > >>> Well, > >>> > >>> please, correct me if I'm wrong in some of this sentences. I > >>> will try to rewrite my email in a more clear terminology. > >>> > >>> Following [1] I understand that a realtime task is scheduled by > >>> the > > Xenomai > >>> scheduler and a non-realtime by the Linux scheduler. I can use > >>> the terms "thread" and "task" in the same meaning. > >> > >> Again: the terms "real-time" and "non real-time" are ambiguous. > >> Please stick to the terms "task with a shadow", "task without a > >> shadow" and "primary mode" or "secondary mode". > >> > > :-( > > > > Ok, > > > > I agree with you that the nomenclature is important to define > > correctly but please don't be so strict. > > I'm in the open source world since long time ago, > > and I understand perfectly that the main developers of a projects > > are tired of dummy questions, or not clear mails, etc. But, I think > > that the relatime world is a complex thing, and not so easy when > > you are learning, or having troubles. > > > > And although that there's a lot documentation, it's difficult to > > find the document that fits all your doubts. > > > > So, again, please, correct me if I'm wrong in some of this > > sentences. I will try to rewrite my email in a more clear > > terminology. > > > > Following [1] and [2] I understand that a realtime thread is > > executed in primary mode and scheduled by the Xenomai scheduler. > > Listen, there are three cases: > 1- thread with a shadow running in primary mode > 2- thread with a shadow running in secondary mode > 3- thread without a shadow > > and you want to use two words "real-time thread" and "non real-time > thread". 1 is obviously a real-time thread, 3 is obviously a > non-real-time thread. What do you make of 2? If you consider "being > real-time" a "static" property, then 2 is a real-time thread. If you > consider it a run-time property, a state of a task, then 2 is a > non-real-time thread.
For me real-time is a dynamic property. So, when a thread with a shadow is executed in primary mode I call it real-time. When the same thread is executed in secondary mode, it loses the real-time property. > So, again, depending on what you make of 2, you may be wrong or right. > If 2 is with 1, you are wrong, a real-time thread can be scheduled by > Linux scheduler, it is called secondary mode. > If 2 is with 3, you are > right, a real-time thread is always scheduled by Xenomai scheduler. OK. I think I understand the concept, "a real-time thread (a thread with a shadow running in primary mode) is always scheduled by Xenomai scheduler". > > If this RT thread call a non-RT primitive, then RT-Nucleus move > > this RT-Thread to the Linux queue and this thread is controlled by > > the Linux scheduler. A Non-RT thread is executed in secondary mode > > and controlled by the Linux scheduler. > > If 2 is with 3 (which would make your first assertion right), here you > are wrong. Only a thread with a shadow can run in secondary mode, > there is no primary or secondary mode for threads without a shadow. This is something that I don't understand yet. Then, what's the difference (practical) between a thread with a shadow running in secondary mode and a thread without a shadow. I'm asking this because now we are having a discussion with Orestes, because I have _always_ understood that all Linux tasks were executed in secondary mode, and reading you I understand that this is not true. So, "where" is Linux running its tasks? > > > > What I don't understand is for example, I create a C/C++ program, > > and I use the command rt_task_create, linked against xenomai and > > native, and not use the POSIX skin. This program has its own main > > thread and another thread: the thread of the rt_task. May I > > understand that the main thread of the program is controlled by the > > Linux scheduler and executed in secundary mode and the rt- task is > > controlled by the Xenomai scheduler and executed in primary domain? > > It's true? > > The main thread is controlled by the Linux scheduler, and not executed > in secondary mode, since it does not have a shadow. OK, I need to understand it. Thanks in advance, Leopold -- -- Linux User 152692 Catalonia -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: This is a digitally signed message part. URL: <http://www.xenomai.org/pipermail/xenomai/attachments/20140220/9dbe3db7/attachment.sig> _______________________________________________ Xenomai mailing list Xenomai@xenomai.org http://www.xenomai.org/mailman/listinfo/xenomai