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.