Why Completely Fair Scheduler(CFS) using Red-Black tree instead of Min-heap?

venu gangireddy venu.gangireddy at gmail.com
Sat Oct 17 14:25:29 EDT 2015


Hi,

Currently, I am learning about CFS scheduler in linux, and I want to know
reason about the data structure chooses in CFS implementation.

CFS scheduler picks next process based on minimum virtual time and to get
this value efficiently its using Red-Black tree(rbtree), using rbtree we
will get minimum O(h) here h is height of rbtree. But, using min-heap we
can get min virtual time process in O(1) time only. I just want to know why
min-heap is not consider in CFS implementation and is there any
difficulties using min-heap in kernel level?

Thanks in advance.

-- 

*Regards,*
*Venugopal Reddy.*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20151017/ed7f3ade/attachment.html 


More information about the Kernelnewbies mailing list