Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

…in which case this algorithm will be terrible because it busy-waits instead of having condition variables…

I'm seeing sched_yield() calls in there. It looks like a blocked process will yield its CPU core to available, productive work.

If there isn't enough work to keep all the CPU cores busy then it will spin around asking "Am I ready?" more often than required, but at that point you have a machine under less than full load and it doesn't really matter. (power use aside, also assuming they stay in cache while doing that).



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: