System idle process
Encyclopedia
In Windows NT
operating systems, the System Idle Process contains one or more kernel threads
which run when no other runnable thread can be scheduled on a CPU. For example, there may be no runnable thread in the system, or all runnable threads are already running on a different CPU. In a multiprocessor system, there is one idle thread associated with each CPU.
The primary purpose of the idle process and its threads is to eliminate what would otherwise be a special case in the scheduler. Without the idle threads, there could be cases when no threads were runnable, or "Ready" in terms of Windows scheduling states. Since the idle threads are always in a Ready state (if not already Running), this can never happen. Thus whenever the scheduler is called due to the current thread leaving the CPU, it can always find another thread to run on that CPU, even if it is only the CPU's idle thread.
The scheduler will never select an idle thread for execution on a given CPU if there are any other threads eligible to run on that CPU. The CPU time attributed to the idle process is therefore indicative of the amount of CPU time that is not needed or wanted by any other processes in the system.
The scheduler treats the idle threads as special cases in terms of thread scheduling priority. All other threads have a priority in the range 0 through 31, inclusive, with higher priorities always preempting lower. The idle threads do have a priority member in their thread objects but this data is not used to determine when to run them. Instead the scheduler selects the idle thread for a CPU whenever there are no threads in the priority range 0 through 31 that can run on the CPU. It is as if the idle threads each have a priority of negative one. It is not possible to create additional threads that are scheduling peers of the idle threads, even from kernel mode.
In Windows 2000 and later the threads in the System Idle Process are also used to implement CPU
power saving. The exact power saving scheme depends on the operating system version and on the hardware and firmware
capabilities of the system in question. For instance, on x86 processors under Windows 2000, the idle thread will run a loop of halt
instructions, which causes the CPU to turn off many internal components until an interrupt request
arrives. Later versions of Windows implement more complex CPU power saving methods. On these systems the idle thread will call routines in the Hardware Abstraction Layer to reduce CPU clock speed or to implement other power-saving mechanisms.
The CPU time consumed by the System Idle Process is commonly of interest to end users, as it is a measure of the CPU utilization in their system which is easily accessible through Windows Task Manager
. Understanding its function can alleviate concern: the System Idle Process and its threads eliminate the possibility of the scheduler having to deal with the exception to a rule. Its threads are scheduled at a lower priority than any other threads can reach; if no ordinary thread is scheduled to run on a free CPU, then and only then does the scheduler select that CPU's System Idle Process thread for execution. In other words, although it may appear to users that their CPU is being monopolized by the idle process, it is merely acting as a sort of placeholder during "free time" (therefore, whenever the idle process appears to be consuming most of the CPU, it is proof that no other process wants that CPU time).
There are more detailed sources of such information available through Windows' performance monitoring system (accessible with the perfmon program), which includes more finely grained categorization of CPU usage. A limited subset of the CPU time categorization is also accessible through the Task Manager
, which can display CPU usage by CPU, and categorized by time spent in user vs. kernel code.
Windows NT
Windows NT is a family of operating systems produced by Microsoft, the first version of which was released in July 1993. It was a powerful high-level-language-based, processor-independent, multiprocessing, multiuser operating system with features comparable to Unix. It was intended to complement...
operating systems, the System Idle Process contains one or more kernel threads
Thread (computer science)
In computer science, a thread of execution is the smallest unit of processing that can be scheduled by an operating system. The implementation of threads and processes differs from one operating system to another, but in most cases, a thread is contained inside a process...
which run when no other runnable thread can be scheduled on a CPU. For example, there may be no runnable thread in the system, or all runnable threads are already running on a different CPU. In a multiprocessor system, there is one idle thread associated with each CPU.
The primary purpose of the idle process and its threads is to eliminate what would otherwise be a special case in the scheduler. Without the idle threads, there could be cases when no threads were runnable, or "Ready" in terms of Windows scheduling states. Since the idle threads are always in a Ready state (if not already Running), this can never happen. Thus whenever the scheduler is called due to the current thread leaving the CPU, it can always find another thread to run on that CPU, even if it is only the CPU's idle thread.
The scheduler will never select an idle thread for execution on a given CPU if there are any other threads eligible to run on that CPU. The CPU time attributed to the idle process is therefore indicative of the amount of CPU time that is not needed or wanted by any other processes in the system.
The scheduler treats the idle threads as special cases in terms of thread scheduling priority. All other threads have a priority in the range 0 through 31, inclusive, with higher priorities always preempting lower. The idle threads do have a priority member in their thread objects but this data is not used to determine when to run them. Instead the scheduler selects the idle thread for a CPU whenever there are no threads in the priority range 0 through 31 that can run on the CPU. It is as if the idle threads each have a priority of negative one. It is not possible to create additional threads that are scheduling peers of the idle threads, even from kernel mode.
In Windows 2000 and later the threads in the System Idle Process are also used to implement CPU
Central processing unit
The central processing unit is the portion of a computer system that carries out the instructions of a computer program, to perform the basic arithmetical, logical, and input/output operations of the system. The CPU plays a role somewhat analogous to the brain in the computer. The term has been in...
power saving. The exact power saving scheme depends on the operating system version and on the hardware and firmware
Firmware
In electronic systems and computing, firmware is a term often used to denote the fixed, usually rather small, programs and/or data structures that internally control various electronic devices...
capabilities of the system in question. For instance, on x86 processors under Windows 2000, the idle thread will run a loop of halt
HLT
In the x86 computer architecture, HLT is an assembly language instruction which halts the CPU until the next external interrupt is fired. Such interrupts are used by devices in order to signal to the CPU that an event occurred which the CPU shall react on...
instructions, which causes the CPU to turn off many internal components until an interrupt request
Interrupt request
The computing phrase "interrupt request" is used to refer to either the act of interrupting the bus lines used to signal an interrupt, or the interrupt input lines on a Programmable Interrupt Controller...
arrives. Later versions of Windows implement more complex CPU power saving methods. On these systems the idle thread will call routines in the Hardware Abstraction Layer to reduce CPU clock speed or to implement other power-saving mechanisms.
The CPU time consumed by the System Idle Process is commonly of interest to end users, as it is a measure of the CPU utilization in their system which is easily accessible through Windows Task Manager
Windows Task Manager
Windows Task Manager is a task manager application included with the Microsoft Windows NT family of operating systems that provides detailed information about computer performance and running applications, processes and CPU usage, commit charge and memory information, network activity and...
. Understanding its function can alleviate concern: the System Idle Process and its threads eliminate the possibility of the scheduler having to deal with the exception to a rule. Its threads are scheduled at a lower priority than any other threads can reach; if no ordinary thread is scheduled to run on a free CPU, then and only then does the scheduler select that CPU's System Idle Process thread for execution. In other words, although it may appear to users that their CPU is being monopolized by the idle process, it is merely acting as a sort of placeholder during "free time" (therefore, whenever the idle process appears to be consuming most of the CPU, it is proof that no other process wants that CPU time).
There are more detailed sources of such information available through Windows' performance monitoring system (accessible with the perfmon program), which includes more finely grained categorization of CPU usage. A limited subset of the CPU time categorization is also accessible through the Task Manager
Windows Task Manager
Windows Task Manager is a task manager application included with the Microsoft Windows NT family of operating systems that provides detailed information about computer performance and running applications, processes and CPU usage, commit charge and memory information, network activity and...
, which can display CPU usage by CPU, and categorized by time spent in user vs. kernel code.
See also
- List of Microsoft Windows components
- Idle (CPU)Idle (CPU)A computer processor is described as idle when it is not being used by any program.Programs which make use of CPU Idle Time mean that they run at a low priority so as not to impact programs that run at normal priority...
- Microsoft WindowsMicrosoft WindowsMicrosoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...
- HLTHLTIn the x86 computer architecture, HLT is an assembly language instruction which halts the CPU until the next external interrupt is fired. Such interrupts are used by devices in order to signal to the CPU that an event occurred which the CPU shall react on...