Idle Time Process
Transcript of Idle Time Process
-
7/31/2019 Idle Time Process
1/7
Idle time process
A cpu is called in idle state if it doesnt do any work.an operating system always
wait for the interrupt and event so that it can execute it from cpu .a cpu execute
ghz of instructions per second .a user can type only 100 or 150 words per minute
or can open 1 or 2 programs in a second.as you can see user is very slow as
compared to cpu .cpu will execute some instruction and remaining cpu clock will
be wasted without doing any usefull work .
Cpu work like a infinite loop. No matter you execute something or not ,cpu will
always work . when we do nothing on cpu it doesnt mean its doing nothing .cpu
is running its clock and it will continue. In other words if we do nothing on
computer we are wasting cpu clocks but doing no usefull work .
Cpu clock is the rate at which instruction execute.in idle state not only the cpu but
also the bus clock doing nothing .
(http://www.webopedia.com/TERM/C/clock_speed.html)
However we can consume cpu clock by some technique and can achieve some
usefull work at idle state . there are 3 levels where we can process at idle state.
1. Operating system level2. Application level3. Hardware level
http://www.webopedia.com/TERM/C/clock_speed.htmlhttp://www.webopedia.com/TERM/C/clock_speed.htmlhttp://www.webopedia.com/TERM/C/clock_speed.htmlhttp://www.webopedia.com/TERM/C/clock_speed.html -
7/31/2019 Idle Time Process
2/7
Operating system always wait for an event to occur or always wait for some input
from the user .so to do some usefull task in idle state operating system. At idle
time os execute some special process called idle task . task shedular handle the
process which process to execute first . task shedular handle idle state in several
ways task shedular runs after every 15 mints in windows .in every 15 mints it
check is there any interruption from user via a keyboard and mouse. If there is no
interruption computer is said to be idle .
Previous to windows 7 a computer is said to be idle if there is no interruption or
event,and all the process and disk are idle in last 15 mints .in windows 7
computer is said to be idle if it is running low priority application
If(threadPriodity
-
7/31/2019 Idle Time Process
3/7
in microsoft windows there is service called system idle process which is not
actually a process is is basically a counter that counts how much cpu is in idle
state like if it shows 99 its mean 99%.
If task can be started when computer enters idle state by defining idle trigger
A trigger will trig a task when computer idle state when computer enter idle state
Idle trigger
idle trigger is a set of criteria when met start execute a task.in Microsoft
windows task shedular provide both time based trigger and eventbased trigger .
time based trigger start at specified time.
Event based start a task in response to a event
With the time based trigger we can set a tast to start when computer is
idle for more than 30 mints.so 30 mints is the idle waittime of the task.
But with events based we can start a task at specific events like we can
run a program at logon automatically.
Idle task usally are like windows defragment utility ,restore point andcleanup utility.
http://msdn.microsoft.com/en-us/library/windows/desktop/aa383619(v=vs.85).aspx
http://askville.amazon.com/System-Idle-Process/AnswerViewer.do?requestId=7197942
http://msdn.microsoft.com/en-us/library/windows/desktop/aa383619(v=vs.85).aspxhttp://msdn.microsoft.com/en-us/library/windows/desktop/aa383619(v=vs.85).aspxhttp://askville.amazon.com/System-Idle-Process/AnswerViewer.do?requestId=7197942http://askville.amazon.com/System-Idle-Process/AnswerViewer.do?requestId=7197942http://askville.amazon.com/System-Idle-Process/AnswerViewer.do?requestId=7197942http://msdn.microsoft.com/en-us/library/windows/desktop/aa383619(v=vs.85).aspx -
7/31/2019 Idle Time Process
4/7
processidle task api;
we discussed some processs idle task like drfragment ,diskcleanup utility and restored point .
these task are of very low priority even a mouse event can preempt this processes .
in microsoft all these idle task are ccontrolable by api advapi.dll the purpose of this api is toforcly execute the pending task
we can call this api from cammandline
rundll32.exe advapi32.dll,processidle task
http://msdn.microsoft.com/en-us/library/windows/hardware/gg463004.aspx
application level
application programmer can also exrcute task when cpu is idle
for example aotumatic scanning in antiviruses is example.idle time scan can be
hard coded in the program and sometimes you can change it .
Task start15 mints
-
7/31/2019 Idle Time Process
5/7
antivirus like Norton antivirus provides idle time scanning and we can also define
the duration of idle time out scan
https://www-secure.symantec.com/norton-support/jsp/help-
solutions.jsp?docid=v16052251_NIS_Retail_2012_en_us&lg=english&ct=united%20states&product=home&version=1&pvid=f-home
programmers can manuly set the condition and can exexute process through
performancecounter cpucounter;
cpucounter.countername=%processor time;
if(cpuCounter.nestvalue
-
7/31/2019 Idle Time Process
6/7
Hardware level
Today hardware also providing technique to handle idle state .most of
the devices are handheld or portable . when we talk about processor
we represent idle state as c state there are many c states like c0 ,c1 ,c2
etc
C0 is operational state means e t is doing useful work c1 is idle state
and c2 c3 are also idle state.
From the hardware point of view we talk about the portion cpu which is
idle .
There are 3 cstate of the cpu we can divide
1.Core cstateIf cpu has multicore then one is idle we can turn of it to savepower
2.Processor c stateAs whole cpu
3 logical c state
Its how os see cpu c state
http://software.intel.com/en-us/blogs/2008/03/27/update-c-states-c-states-and-even-more-c-
states/
http://software.intel.com/en-us/blogs/2008/03/27/update-c-states-c-states-and-even-more-c-states/http://software.intel.com/en-us/blogs/2008/03/27/update-c-states-c-states-and-even-more-c-states/http://software.intel.com/en-us/blogs/2008/03/27/update-c-states-c-states-and-even-more-c-states/http://software.intel.com/en-us/blogs/2008/03/27/update-c-states-c-states-and-even-more-c-states/http://software.intel.com/en-us/blogs/2008/03/27/update-c-states-c-states-and-even-more-c-states/ -
7/31/2019 Idle Time Process
7/7
so as we know processor running state is called c0.other c states
like c1,c2 consume less power but also low performance
in c3 state the phase locked loop is shut down to turn off the
clock.After that c4 state the voltage to the processor is reduced to
avoid leakage .and in mobile devices c5 is deep sleep state in
which voltage is reduced furtherhttp://www.intel.com/technology/itj/2008/v12i3/2-paper/4-Power.htm
intel hyperboost technology
this is also a buitin technology that dynamically make processor to
run faster .depend on the workloead temperature limits. And if
the demand is not enough it will automatically slowed down to its
normal speed
http://www.intel.com/technology/itj/2008/v12i3/2-paper/4-Power.htmhttp://www.intel.com/technology/itj/2008/v12i3/2-paper/4-Power.htmhttp://www.intel.com/technology/itj/2008/v12i3/2-paper/4-Power.htm