Detecting the Idle State

A task can be handled in several ways when the computer enters an idle state. This includes defining an idle trigger or setting the idle conditions for when the task starts.

Detecting the Idle State

In Windows 7, the Task Scheduler verifies that the computer is in an idle state every 15 minutes. Task Scheduler checks for an idle state using two criteria: user absence, and a lack of resource consumption. The user is considered absent if there is no keyboard or mouse input during this period of time. The computer is considered idle if all the processors and all the disks were idle for more than 90% of the last detection interval. (An exception would be for any presentation type application that sets the ES_DISPLAY_REQUIRED flag. This flag forces Task Schedule to not consider the system as being idle, regardless of user activity or resource consumption.)
In Windows 7, Task Scheduler considers a processor as idle even when low priority threads (thread priority < normal) execute.
In Windows 7, when the Task Scheduler detects that the computer is idle, the service waits only for user input to mark the end of the idle state.
In Windows 8, Task Scheduler performs the same general user absence and resource consumption checks. However, Task Scheduler relies on the operating system power subsystem to detect user presence. By default, the user is considered absent after four minutes of no keyboard or mouse input. The resource consumption verification time is shortened to 10 minute intervals when the user is present. When the user is away, the verification time is shortened to 30 second intervals. Task Scheduler makes additional resource consumption checks for the following events:
  • User presence state changed
  • AC/DC power source changed
  • Battery level changed (only when on batteries)
When any of the events above happens, Task Scheduler tests the computer for idleness since the last verification time. In practice, this means that Task Scheduler may declare the system as idle immediately after user absence is detected, if the other conditions have been met since the last verification time.
In Windows 8, the CPU and IO thresholds are set to 80%.
When detecting the idle state in Windows 8 Server, Task Scheduler does not take user presence or absence into account. To mark the end of the idle state, Task Scheduler revises the resource consumption once in 90 minutes.

Comments

Popular posts from this blog

How to Improve Font Rendering in Windows 10

How to Enable Windows 10 Automatic Back Up The Registry?

How to Make the Recycle Bin Empty Itself Every So Often