Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Source code of System idle process

Just out of interest: what is the source code of system idle process? Which instructions are executed? How is CPU managed to enter power saving mode?

like image 234
Andy Avatar asked Sep 14 '25 20:09

Andy


1 Answers

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.

like image 175
wj32 Avatar answered Sep 17 '25 20:09

wj32



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!