What does an empty run queue entry points to?
I'm trying to figure out the technicalit开发者_运维技巧ies 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?
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.
精彩评论