Re: an idling kernel

Werner Almesberger
2002-11-04T19:10:12Z

Anu wrote:
> Im ready to be beaten up for asking this question ( I am not sure
> which group to post to -- all this is new to me) but, I was wondering how
> one could figure out if the kernel was in idle mode (or idling).

There's more to is than just processes: if your kernel has runnable
tasklets or pending interrupts, it is not truly idle, even though
there may be no runnable processes.

In umlsim, I have some heuristics that seem to catch most cases, but
may be a bit too paranoid. Look at timer.c:wait_kernel (called from
idle) in http://www.almesberger.net/umlsim/umlsim-4.tar.gz

- Werner

--
_________________________________________________________________________
/ Werner Almesberger, Buenos Aires, Argentina wa@almesberger.net /
/_http://www.almesberger.net/____________________________________________/