News for hackers. Stuff that matters.
Re:How Inefficient Can a Sort Algorithm Be? (2012) [pdf] by benchaney on Tuesday March 19, 2019 @09:10AM (#19430407)
Figuring out which threads to wake up when is an equivalent problem to sorting. The kernel has to maintain a queue of threads sorted on their sleep times in order to implement the sleep syscall in the first place
Re:How Inefficient Can a Sort Algorithm Be? (2012) [pdf] by gambiting on Tuesday March 19, 2019 @03:28PM (#19434703)
Surely that's not true. You can keep a list of threads not sorted by their sleep time and just iterate through them and see if they are due to be woken up or not.
Re:How Inefficient Can a Sort Algorithm Be? (2012) [pdf] by benchaney on Tuesday March 19, 2019 @09:55PM (#19438161)
That winds up being more work.