Hacker News new | ask | show | jobs
by pdimitar 2268 days ago
Thank you for the extremely informative answer! It was very helpful.

Another question, if you allow me:

Will you provide preemptive scheduling primitives? Or will they be possible through the more low-level interface you described?

IMO preemptive scheduling is something that's very necessary nowadays, especially with the explosion of CPU core count.

1 comments

I am not sure I understand the suggestion that preemptive scheduling is important with the explosion of CPU core count. You may need preemptive scheduling even on a single core if your application expects some fairness of scheduling guarantees. Am I missing something?

We can do preemptive scheduling of user-level threads by registering a timer interrupt with the OS and preempting the currently running user-level thread in favor of another one. This is up to the individual libraries to implement. These issues are discussed in [1] Sec 4.3.

No, you're not missing anything -- I was just saying that it would be a shame if people still can't code preemptively scheduled parallel apps when the average home gaming machine is going to have 16 cores soon and that many devs (me included) are looking to buy a 32/64-core workstation. Nothing else. :)

Really exciting that preemption is possible. Thanks for your insights!