|
Hey, this is a small but frustrating one. This is in legOS 1.7 but I beleive
it will still be in 2.0 as it's caused by the 1 priority to a task requirement.
If you write code like the following:
while(1){
wait(for something);
kill(t1);
t1 = execi(&move_around, 1, ...);
sleep(1);
}
sometimes the execi fails. After reading through the kill() and task
swapping code it's fairly obvious why this happens (the thread doesn't die
until it get's a chance to run, so when execi is run the idleQ ends up with two
tasks of equal priority). Like I said it's not a major problem, turning on
same priority levels would fix it as would some code changes to the program,
but should everyone have to dig into the code to figure this out? However if
nothing is done in the legOS code about this, adding kill()'s specific
behaviour in the docs would make me happy.
ah well this has probably all been gone over before long ago :)
Colin Northway
|
|
Message has 1 Reply: | | Re: legOS limitation
|
| Hi Colin, (...) The one task per priority level requirement is gone at least since March. There is a priority chain mechanism now, with round-robin scheduling within a priority level. (...) Yes, a task won't die while higher-priority tasks are (...) (25 years ago, 27-Oct-99, to lugnet.robotics.rcx.legos)
|
2 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|