Is the number of running task context limited to 64 ?

I am trying Orocos 1.6.0, and I want to see how many task context I can run simultaneously on my target. So I have written a program that creates many TaskContext (100) which communicates throw DataPort (see enclosed file).
I can see that all the TaskContext are created properly, but only the first 64 are running, the others are stopped. I have an error if I try to start one from the TaskBrowser, unless I stop another one already running.

Is this a limitation due to Orocos or Gnu/Linux ?

Best regards

AttachmentSize
main.cpp4.07 KB

Is the number of running task context limited to 64 ?

On Tuesday 04 November 2008 14:58:46 nicolas [dot] mabire [..] ... wrote:
> I am trying Orocos 1.6.0, and I want to see how many task context I can
> run simultaneously on my target. So I have written a program that creates
> many TaskContext (100) which communicates throw DataPort (see enclosed
> file). I can see that all the TaskContext are created properly, but only
> the first 64 are running, the others are stopped. I have an error if I try
> to start one from the TaskBrowser, unless I stop another one already
> running.
>
> Is this a limitation due to Orocos or Gnu/Linux ?

It's a limitation of the current 'PeriodicActivity' implementation. You can
create no more than 64 periodic activities with the same priority and period,
because they are all lined up in one thread. We fixed the memory allocation
to 64 instances. If you want that to grow, see TimerThread::MAX_ACTIVITIES in
TimerThread.hpp

In practice, you'd maybe use SlaveActivity to reliably control such a large
number of 'sequential' periodic activities.

Peter

Is the number of running task context limited to 64 ?

I agree with you.
But I have noticed something that looks strange, again :
the results depends wether the program has the root privilege.
If you are *not* root, multiple Periodic Activities with the same priority and period run in the same OS thread, but if you *are* root, they run in different OS threads (1 per component).
Is this "normal" ?

Nicolas