> -----Message d'origine-----
> De : Gilles Chanteperdrix [mailto:[EMAIL PROTECTED]
> Envoyé : jeudi, 20. juillet 2006 13:50
> À : ROSSIER Daniel
> Cc : [EMAIL PROTECTED]; [email protected]
> Objet : RE: [Xenomai-help] Strange behaviour w/mutex&semaphore
> 
> ROSSIER Daniel wrote:
>  >
>  >
>  > > -----Message d'origine-----
>  > > De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
>  > > Envoyé : jeudi, 20. juillet 2006 13:03
>  > > À : ROSSIER Daniel
>  > > Cc : [email protected]
>  > > Objet : Re: [Xenomai-help] Strange behaviour w/mutex&semaphore
>  > >
>  > > ROSSIER Daniel wrote:
>  > > > Hi all,
>  > > >
>  > > > I've a strange behaviour with the attached piece of code.
>  > > > It's really simple: there are 3 tasks and we're spinning within the
> task
>  > > in order
>  > > > to simulate task load.
>  > > >
>  > > > It's a pure academic exercice, so don't try to think about the
>  > > usefulness of this code ;-)
>  > > >
>  > > >
>  > > > Actually, after insmod'ing the code into the kernel, the system
> freezes
>  > > and
>  > > > the "meteoDataAcquisition" task is suspended runaway by the
> internal
>  > > xenomai watchdog.
>  > > >
>  > > > Why?
>  > > >
>  > > > Anything wrong in this code?
>  > >
>  > > Check the values you assign to rt_task_set_periodic. Kind of... fast?
>  >
>  > No, with at these frequencies, there is no problem (the jiffy is at
>  > 1ms).
> 
> There are two tasks with a period of 20 ms that are spinning 10 ms
> each. Does not this put a 100% load on the RT system ? If yes, then
> Linux has no time left to run. That is what the watchdog is here to
> avoid. You should try reducing the spinning time in order to let some
> time for Linux to run.

No, there are: 
- a task "MeteoDataAcquisition", with a spin of 10ms, and a period of 1s 
(1000ms).
- a task "BusManagement", with a spin of 5ms, and a period of 20ms
- a task "ComHandling", with a spin of 10ms, and a period of 20ms.

So actually, the CPU load is 10/1000 + 5/20 + 10/20 = 0.76; and this gives 
Linux chance to run. (But again Gilles, it works with the following statement:  
rt_task_set_periodic(&meteoDataAcquisitionTask, TM_NOW, 1000);

I don't understand why it doesn't work with a delay of 18ms on the first 
release point of this task.

> --
> 
> 

Daniel

_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help

Reply via email to