[ECOS] Thread states

Nick Garnett nickg@cygnus.co.uk
Wed Jan 10 03:30:00 GMT 2001


Paleologos Spanos <paleolog@ee.ucla.edu> writes:

>  From what I have understood ,the wait_queue is a number of bits with
> every bit to represent a specific thread which is on the scheduler.So
> every bit is 1 if the corresponding thread is waiting for execution or 0
> if it has finished(EXITED state).Is this correct?

The bit will also be zero if the thread is waiting for some reason, or
has been suspended. The bit is only ever 1 if the thread is ready to
execute.

>  So,in my previous mail I was asking if after a thread has completed its
> execution ,will the corresponding bit on the wait_queue become 0.
> 

Yes, since the thread in no-longer runnable. In addition it also
deregisters itself from the scheduler so another thread could be
created with it's priority. So, if you restart the thread it may be
given a different priority.

-- 
Nick Garnett, eCos Kernel Architect
Red Hat, Cambridge, UK


More information about the Ecos-discuss mailing list