45 points · by zdw · 4y ago · 15 comments
(4am thoughts are sometimes intrusive.)
Also if you’re interested in this kind of thing, “operating systems in three easy pieces” was surprisingly good. https://pages.cs.wisc.edu/~remzi/OSTEP/
It’ll teach you all the history behind the OS decisions we take for granted now. I was delighted to learn that early OS’s used to have only one global lock. Sounds silly, but it’s extremely effective — HN does the same.
It has a bunch of chapters presenting these kinds of “games” user programs can play to get an advantage against the schedulers.
Also it’s $10 for instant access to a pdf. I was amazed. Buying a book is always such a hassle, except this time it was 30 seconds.
If anyone deserving credit for this, it’s Intel after introducing the Pentium line.
[0] https://en.wikipedia.org/wiki/Betteridge%27s_law_of_headline...
>Neither the developer nor user appears to have access to any facility to adjust run-time policy
Which is false, there is an API for this:
https://developer.apple.com/library/archive/documentation/Pe...
For example you can force a process to run on efficiency cores by using the background QoS, but you have no way of moving that process back to performance cores other than relaunching it.