Subject:
|
Re: multiple "execi" with different priorities
|
Newsgroups:
|
lugnet.robotics.rcx.legos
|
Date:
|
Wed, 21 Feb 2001 22:12:32 GMT
|
Viewed:
|
1348 times
|
| |
| |
In lugnet.robotics.rcx.legos, Thanasis Kostakos writes:
> Hi,
>
> I am trying to run three different tasks, with the "execi" command. When all of
> the have the same priority=10, everything works ok.
> When I change the priority in one of them priority=11 or 12, then everything
> seems to go much slower, and sometimes the RCX hangs.
> I use the command:
> execi(&process,0,NULL,10,DEFAULT_STACK_SIZE);
>
> Is there a problem with the way I use the command?
The call looks fine, but as Bernado said, you have to make sure that higher
priority tasks relinquish control regularly. IIRC all tasks of a given priority
must get a slice before any lower priority tasks get any slice. And remember
that LegOS uses co-operative multi-tasking, not pre-emptive, so your tasks have
to specifically relinquish control before any other task will be scheduled.
Someone please correct me if I'm wrong....
My rule of thumb is the higher the priority, the less it should do in each
time-slice.
HTH
ROSCO
|
|
Message has 1 Reply:
Message is in Reply To:
| | multiple "execi" with different priorities
|
| Hi, I am trying to run three different tasks, with the "execi" command. When all of the have the same priority=10, everything works ok. When I change the priority in one of them priority=11 or 12, then everything seems to go much slower, and (...) (24 years ago, 21-Feb-01, to lugnet.robotics.rcx.legos)
|
5 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
This Message and its Replies on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|