All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sebastian Pavez <sebastian.pavez.t@gmail.com>
To: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Cc: Xenomai <xenomai@xenomai.org>
Subject: Re: [Xenomai] Doubts about priorities with periodic tasks (Posix Skin)
Date: Wed, 08 May 2013 15:42:07 -0400	[thread overview]
Message-ID: <518AAA8F.6010309@gmail.com> (raw)
In-Reply-To: <518A9E20.9020400@xenomai.org>

El 08/05/2013 14:49 p.m., Gilles Chanteperdrix escribió:
> On 05/08/2013 08:39 PM, Sebastian Pavez wrote:
>
>> Obviously Xenomai can't utilize the 100% of CPU,
>
> Xenomai can utilize 100% of the CPU, the problem is that if it does so
> for a too long time, the system crashes eventually.
Ok, thanks for the clarification
>> so my question is: If I
>> try to work in Xenomai, with some task that are not able to execute
>> completely, the CPU will try to utilize resource that doesn't have?
>
> I do not understand this question.
I will explain all again at the end of the email
>> In regard the changes I made, how are related the Xenomai scheduler and
>> the Linux one? where I could find some detailed documentation about this
>> (to put in my references)? Is there something like an scheduler of
>> schedulers that take the execution of Xenomai's task and then the Linu'x
>> ones?
>
> Linux as a whole is seen as one task by Xenomai scheduler, executed when
> Xenomai scheduler has no other task to execute.
>
>> A confirmation of why my previous test (both tasks running with Xenomai)
>> was a dead end would be great. Some souce of information (more formal
>> than a suggestion) would also be quite appreciated.
>
> You never showed a test that I could run on my machine to try and
> understand what you are trying to prove. And I still do not understand.
> Please make a test program, using rt_timer_spin to simulate the cpu
> load, and explain me, in very simple word, or with a printf in the test
> code, or with a comment in the test code, the problem you observe. Is it
> a latency problem?

Just some points to clarify,

- First of all my problem isn't with the functioning of Xenomai. That 
works jus fine ... I think.
- The whole idea of my code is to explain the theory behind a real time 
system
- In the theory if you have 2 tasks, the one with the highest priority 
(T1) will execute before the other (T2), if there's sometime left it 
will be executed
- On the other hand, if there's not enough time to execute the task with 
lowest priority (T2) it will be paused by the other one.
- I do that with a same period for both tasks and increasing the 
execution time of T1 order to reduce the time left to T2.
- So for instance, if I have a period of 50us for each task. The 
execution time for T2 is 20us, and for T1 is variable (call it 'E1').
- If 'E1' is less than 30us everything will be ok, both tasks will be 
executed entirely (Case1)
- But, when 'E' is over 30us T2 will not have enough time to complete 
(Case2)

- Whit this in mind, if I have two tasks in Xenomai (with different 
priority) is possible to see this effect, I mean for Case1 everything 
goes fine. But when I try Case2 the computer hangs up for a while and 
the execution ends. With proc/xenomai/stat I'm able to see that the 
utilization of CPU arrives closely to 100% (That explain the hang up).

All this lead me to the question: What I'm tring to do isn't possible to 
do (based on this results)? I mean, is this state true?: I'll never be 
able to see the effect I'm looking for because Xenomai won't allow me to 
have tasks that are not able to execute entirely? (If you could 
recommend some documentation to read about this would be great).

That's led me to try what I said previously, having one task with 
Xenomai and the other in Linux. This gave me the results I expected 
related with the theory, and that's all I need. But I would like to be 
sure if what I was trying to do before it (both tasks with Xenomai) were 
a dead end. And again, if you could suggest some documentation to read 
about the relation with the schedulers of Xenomai and Linux would be 
just awesome. And if there's something about the behaviour of a task 
created with (priority=0 and policy=OTHER) would be great too, because 
what I read wasn't clear enough for me.

I hope this explanation is more straight, and sorry if it isn't. Like I 
said, my problem isn´t related with a malfunction or error with Xenomai, 
it is if what I'm trying to do doesn't have a foundation.

Thanks, once again.


  parent reply	other threads:[~2013-05-08 19:42 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-06 17:14 [Xenomai] Doubts about priorities with periodic tasks (Posix Skin) Sebastian Pavez
2013-05-06 18:17 ` Gilles Chanteperdrix
2013-05-06 19:15   ` Sebastian Pavez
2013-05-06 19:33     ` Gilles Chanteperdrix
2013-05-06 21:12       ` Sebastian Pavez
2013-05-07 11:29         ` Gilles Chanteperdrix
2013-05-07 12:36           ` Sebastian Pavez
2013-05-08 13:19             ` Gilles Chanteperdrix
2013-05-08 18:39               ` Sebastian Pavez
2013-05-08 18:49                 ` Gilles Chanteperdrix
2013-05-08 18:50                   ` Gilles Chanteperdrix
2013-05-08 19:42                   ` Sebastian Pavez [this message]
2013-05-08 20:05                     ` Gilles Chanteperdrix

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=518AAA8F.6010309@gmail.com \
    --to=sebastian.pavez.t@gmail.com \
    --cc=gilles.chanteperdrix@xenomai.org \
    --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.