I'm trying to figure out the technicalities of scheduling in Linux. What I can't figure out is what happens with those entries in the run_queue where there are no running processes. In the run_queue we have a bitmap, a counter, and the array of lists themselves. For a list that is empty because there are no running tasks with its priority, what do the next and prev pointers point to?
+3
A:
If you're talking about the struct rt_prio_array
structure, empty lists have next
and prev
pointers that point to the struct list_head
in the struct rt_prio_array
itself.
This is true of all the list.h
lists. The list_empty()
function is provided to test for this condition.
caf
2010-04-28 00:30:11