Re:What's a CPU to do when it has nothing to do?
by bonzini on Thursday October 11, 2018 @04:25AM
(#18191773)
IDLE is the priority of a process that runs only when the system is otherwise idle. It shouldn't be preempted by zeroing memory.
[ Parent
| on HN ]
Re:What's a CPU to do when it has nothing to do?
by na412 on Thursday October 11, 2018 @05:10AM
(#18191962)
But then under what circumstances will the zero page thread ever be scheduled?
Re:What's a CPU to do when it has nothing to do?
by masklinn on Thursday October 11, 2018 @09:53AM
(#18193520)
It's confusing, but "idle" is a priority class as well as a state: https://docs.microsoft.com/en-us/windows/desktop/procthread/...
The idle task (when there's nothing to run) doesn't have a priority at all, it just gets run when nothing else is available. the "idle" priority is an actual priority, for when there's no higher-priority task to run. The ZPT is prioritized below "idle", so super-duper-low priority.
Re:What's a CPU to do when it has nothing to do?
by dTal on Friday October 12, 2018 @05:09AM
(#18200214)
Thank you for this clear explanation. It is confusing!
Re:What's a CPU to do when it has nothing to do?
by blattimwind on Thursday October 11, 2018 @07:07AM
(#18192444)
When there are no runnable idle threads.
Re:What's a CPU to do when it has nothing to do?
by chaosite on Thursday October 11, 2018 @05:14AM
(#18191969)
So the zero page process runs when one core is busy but the rest are free?
Re:What's a CPU to do when it has nothing to do?
by klodolph on Thursday October 11, 2018 @09:29AM
(#18193337)
It runs when the there are no higher-priority processes to schedule on a particular core. IDLE processes are higher priority, so as long as an IDLE process can be scheduled, the zero page process won't run.