开发者

Source code of System idle process

开发者 https://www.devze.com 2022-12-30 21:08 出处:网络
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 exe

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消