Source code of System idle process
Just out of interest: what is the source code of system idle process? Which instructi开发者_开发技巧ons are executed? How is CPU managed to enter power saving mode?
System Idle Process continuously executes KiIdleLoop, with one thread for each processor. You can see this using a process viewer such as Process Explorer. This function essentially checks the Deferred Procedure Call (DPC) list and executes any pending items (e.g. for timers and hardware components). It then calls power management (PoIdle
) which calls the HAL (HalProcessorIdle
) so "power saving mode" can be entered. This, on x86 systems, simply consists of enabling interrupts (sti
) and then the hlt
instruction.
精彩评论