EmbLogic's Blog

The list of TASK_RUNNING processes

When looking for a new process to run on the CPU, the kernel has to consider only the
runnable processes (that is, the processes in the TASK_RUNNING state). Since it would be rather inefficient to scan the whole process list, a doubly linked circular list of TASK_RUNNING processes called runqueue has been introduced. The process descriptors include the next_run and prev_run fields to implement the runqueue list. As in the previous case, the init_task process descriptor plays the role of list header. The nr_running variable stores the total number of runnable processes.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>