[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] the CPU has been heavily loaded



Hi Yohans,

> just a simple note, I think the processes wanting to be run are in the
> ready queue (ready state) not running

Well, that would surely _sound_ logical, but that's not the way it is.

Internally in the kernel, the runnable processes are marked as being in the
TASK_RUNNING state. The list of those processes are stored in the runqueue,
and are counted in the nr_running variable.

The scheduler operates with the states running, interruptible,
uninterruptible, stopped, zombie and swapping. It doesn't use the term
"ready".

--
Jens Kristian Søgaard, Mermaid Consulting I/S,
jens@xxxxxxxxxxxxxxxxxxxx,
http://www.mermaidconsulting.com/