To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.legosOpen lugnet.robotics.rcx.legos in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / legOS / 2229
2228  |  2230
Subject: 
Re: More on threads
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Sat, 19 Jan 2002 20:04:01 GMT
Viewed: 
2266 times
  
On Sat, 19 Jan 2002, Michael Obenland wrote:

I get the "0", no further counting for some minutes. So I think that in
this situation, main indeed gets no more time slices.

I recall that legOS's priority model is pretty rigid. If a thread with a
higher priority never yields, threads with lower priority will never get
any time.

When I write legOS programs, I generally just have everything run at
PRIO_NORMAL. That way I get the multitasking behavior I expect; I yield
when I can, don't worry about it when I can't, and everything gets time. I
generally make things so that most compute-intensive tasks finish very
quickly, and any long-term ones are only one at a time, but it never
hurts to be careful.

--
"From now on, we live in a world where man has walked on the moon.
And it's not a miracle, we just decided to go." -- Jim Lovell

Mike Ash - <http://www.mikeash.com/>, <mailto:mail@mikeash.com>



Message is in Reply To:
  Re: More on threads
 
(...) Digging through tm.c gave me the impression, that main will indeed get no time slice. So I wrote another test program: ---...--- #include <conio.h> #include <unistd.h> pid_t worker; int work_task(int argc, char *argv[]); int main() { int i; i (...) (23 years ago, 19-Jan-02, to lugnet.robotics.rcx.legos)

18 Messages in This Thread:





Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR