3 ms·
No, the kernel gets to do it's job: decide which task ("process" in classical Unix speak) should get the core based on kernel-side scheduling policies, then the
by PaulDavisThe1st 3y ago
No, the kernel gets to do it's job: decide which task ("process" in classical Unix speak) should get the core based on kernel-side scheduling policies, then the task itself gets to decide which thread should run on the core.
The amount of information required to correctly decide which task should get the core is too large to sensibly move across the kernel boundary, and providing read-access to it in a safe way from user space is problematic.
- vacuity 3y agoPerhaps not just any program, but ideally a user could tell the OS that a certain program requires minimal latency across some cores for some duration, or that hardware TCP offload should be prioritized for a server process. Like madvise or fadvise to give the kernel suggestions for optimization, but broader.
- PaulDavisThe1st 3y agoFor some *nixes that already exists. But it is insufficent to provide the OS with information like "if thread N blocks for I/O, run thread T instead", particularly because in the next quantum, it might be "run thread Y instead".