Reply
Old January 24th, 2004 Top | #1
 
perris's Avatar
OSNN Godlike Veteran
Joined: January 2002
Location: new york
Posts: 12,280
Reputation: 4333
Power: 321

Post "System Idle Process" Explained

lots of miss information concerning the system idle process, so, for members of ntfs, I'll give you the skinny...you'll definitely have a heads up on this much not understood feature of xp

if you'd like to do more research, the Microsoft publication "inside windows 2000" is an unbelievable wealth of information and reference

everyone knows, Windows NT is multi threading operating system, which in everyday language just means you can do a bunch of different things on your box, with the illusion that everything is happening simultanously...an amazing ability this is indeed, and everyone should learn to take advantage of it...do not follow that old advice and force your computer to run one only thing at a time, your computer allows you to be so much more productive, it's designed to run many things at once...but that's another discussion.

the reality is, your standard chip can only do one thing at a time, but, it switches back and forth between threads so fast, and so often, that everything looks like it virtually (I love that word) happens at once.

this switching back and forth is managed with a set of algorithms known as "the NT scheduler".

the scheduler simply looks at the priorities on the various threads that are active...it then gives each thread it's share of CPU time, ( this unit of time is known as a quantum )...the quantum length can be adjusted in NT, but that's the word we use when speaking of the time unit the CPU spends with any given thread. Quantum lengths are also devided, and a thread will be preempted and forced to give it up it's remaining quantum immediatly if a higher priority shows up.

the scheduler doesn't look at what process a thread belongs to, it just looks at the priority of a thread...pretty simple...the scheduler then executes the highest priority...this high priority thread will decay a level for every quantum completed...however, the level can be re bumped depending on the program and how it's referenced by the user....for instance as an extreme example, a keyboard stroke can at times bump a priority on an idle thread that is waiting for that stroke by 6 points.

The scheduler will be able to prevent threads from starving due to a priority lower then everything else, (When real time threads are not ready to execute) and the scheduler will make sure every thread gets it's share of CPU...lower priority threads are bumped sometimes to level 15... they can even be given more then one quanta if they haven't had a quantum for too long a period.

there are also other policies that insure lower priorities get a quantum (when real time threads are not ready to execute)... as mentioned, every thread in the 1-15 range will decay a level (to a point set by the program) every time it completes a quantum...and of course, these threads can always get bumped up levels according to use, and so refreshed in priority as well as decayed.

programs also voluntarily give up their priority, and programs get "blocked "from even being considered for a quantum when they are not ready to execute.

"not ready to execute", or "blocked" threads use no CPU time...they incur no CPU overhead and there is no CPU management overhead, the overhead of the NT scheduler is a constant set of algorithms that always run....when a thread or process incurs zero CPU, it's as if it's not even running at all as far as CPU resource liability

if a number of threads have the same priority, these threads are just executed in a round robin fashion along that respective priority.

of course, there's allot of sophistication involved with these scheduling policies, but you now have an accurate model

fyi... even most people that know about CPU scheduling in NT are under the impression that there are 31 priorities in the NT kernel

that's incorrect

there are 32

there is 1 through 15 for the common apps, 16 through 31 for critical threads, and then there is a priority "zero"

in NT, the higher the number a priority, the higher the priority...this is a random choice, and similar to the vms's OS's, (after all, it is David cutler that is responsible for nt)...the reverse could have been true, it's just the way Microsoft did it.

as told, priorities 1 through 15 are the dynamic priorities that typical applications get assigned..the threads in this realm change priorities all along, getting bumped and degraded according to need by the os...these are dynamic in nature.

16 through 31 not dynamic, this is what we mean by "real time" when talking about a threads priority...the priority of real time threads is constant...the os does not change the priorities of these threads..these priorities are used for operations that are time critical...in addition, users with administrative authority can also set real time priorities for applications on their own

so now I finally get to the next level of priority

this is priority level 0 (zero)

your system idle process gets a priority of zero.

This process is a single thread running on each processor, which has the sole task of accounting for processor time when the system isn't processing other threads. In Task Manager, expect this process to account for the majority of processor time.

with priority zero, when no other thread is executing, priority zero gets a quantum.

and so, here is the biggest misinterpretation with the system idle process

if you open your task manager while the CPU is hardly working, and look to processes, you will notice that your system idle process is taking 90% or such of the CPU time.


HA

THIS FIGURE IS MISUNDERSTOOD!!!!

this figure represents how much cpu time has not even been requested by anything you are currently working with
perris is offline   Reply With Quote
Old January 24th, 2004 Top | #2

OSNN Folding Team  
Electronic Punk's Avatar
The Last High
Joined: December 2001
Location: London
Posts: 18,579
Blog Entries: 51
Reputation: 3702
Power: 379

Default

This folding application is keeping my system idle nicely at 0%


Electronic Punk is offline   Reply With Quote
Old January 25th, 2004 Top | #3
 
X-Istence's Avatar
*
Joined: December 2001
Location: USA
Posts: 6,498
Reputation: 2808
Power: 249

Default

Really nice Perris. Good read, and easy to understand.
X-Istence is offline   Reply With Quote
Old January 25th, 2004 Top | #4
 
Henyman's Avatar
Secret Goat Fetish
Joined: June 2002
Location: Dorset, England Posts: More Than You
Posts: 9,603
Reputation: 3548
Power: 282

Default

very good read + easy to understand
Henyman is offline   Reply With Quote
Old January 25th, 2004 Top | #5
 
indyjones's Avatar
OSNN.net Adventurer
Joined: November 2002
Location: England
Posts: 1,567
Reputation: 330
Power: 164

Default

Nie one perries i actually read up on it the other day but yours is a better explanation than the googled ones




Intel Q9450
, Asus Rampage Formula X48, 4Gig Corsair Dominator 8500 @ 1066mhz, Lianli case, Logitech G15 & MX1000. Gigabyte 9800GTX, Pioneer DVDRW, Intel SSD, Zalman 9700, MS ForceFeedBack 2, Dell 2005FPW, Xbox360 Adapter, VISTA X64 Ultimate/ Win7 Ultimate
indyjones is offline   Reply With Quote
Old January 25th, 2004 Top | #6

OSNN Folding Team  
NetRyder's Avatar
Tech Junkie
Joined: April 2002
Location: New York City
Posts: 13,256
Reputation: 4260
Power: 327

Default

Excellent explanation!
Thread Stuck
NetRyder is offline   Reply With Quote
Old January 25th, 2004 Top | #7

OSNN Folding Team  
Erbmaster's Avatar
OSNN Veteran Addict
Joined: March 2003
Location: Middle Of Nowhere - UK
Posts: 1,195
Reputation: 270
Power: 155

Default

Excellent contribution perris
Glad it's got a sticky


The Cake Is A Lie? - Well There'd Better Be Cookies!
Erbmaster is offline   Reply With Quote
Old February 8th, 2004 Top | #8
 
lieb39's Avatar
Apple lover, PC User
Joined: November 2002
Location: Australia
Posts: 526
Reputation: 0
Power: 151

Default

Thanks! That makes sense now...


Did a post help you, or solve a problem you were having?
Click the button under the member's avatar to increase his/her reputation, and to encourage useful posts on the forum.
lieb39 is offline   Reply With Quote
Old February 16th, 2004 Top | #9
 
Ohzopants's Avatar
My mom thinks I'm cool
Joined: January 2004
Location: Montreal
Posts: 165
Reputation: 40
Power: 133

Default

sorry dude...

nice post, but one unit of time is a quanta, quantum is plural
Ohzopants is offline   Reply With Quote
Old February 16th, 2004 Top | #10
 
perris's Avatar
OSNN Godlike Veteran
Joined: January 2002
Location: new york
Posts: 12,280
Reputation: 4333
Power: 321

Default

sorry dude...

nice post, but one unit of time is a quanta, quantum is plural
hmmm

websters dictionary;

Main Entry: 1quan·tum
Pronunciation: 'kwän-t&m
Function: noun
Inflected Form(s): plural quan·ta


so you have it backwards, my paper was correct in that regard.

I did however find one gramma mistake I wouldn't have spotted if not for your post...so thanx for that

I had written;

'...more then one quantum

corrected now to;

...more the one quanta
perris is offline   Reply With Quote
Old March 15th, 2004 Top | #11
 
cryogenic's Avatar
OSNN Addict
Joined: October 2003
Location: TN, blah!
Posts: 241
Reputation: 40
Power: 136

Default

since we're on the subject of grammar... "than" is the correct term, not "then"
cryogenic is offline   Reply With Quote
Old May 27th, 2004 Top | #12
 
Abbadon2001's Avatar
OSNN Addict
Joined: March 2004
Location: UK, Leicestershire
Posts: 119
Reputation: 20
Power: 130

Default

very easy and simple to understand. very nice thread. good to see ones like this around in sticky!


Why did i ever get in to computers - It sucks my wallet dry!
Abbadon2001 is offline   Reply With Quote
Old September 3rd, 2004 Top | #13

OSNN Folding Team  
Steevo's Avatar
Spammer representing.
Joined: September 2004
Posts: 2,566
Blog Entries: 2
Reputation: 1630
Power: 165

Default


Good job!!!!


Meow.
Equal oppertunity hater.
Steevo is offline   Reply With Quote
Old September 13th, 2004 Top | #14
 
munk's Avatar
OSNN Junior Addict
Joined: September 2004
Posts: 4
Reputation: 0
Power: 0

Default

Well, it's definitly a nice explanation, but try to explain this effect:

I opened my task manager to understand your posting. Then I tried the following:
- I kept the task manager open
- I clicked somewhere in this HTML document and held the button down
- I pressed the keys "END" - "POS1" - "END" - "POS1" continuously and very fastly to generate some cpu-load, for my browser (Firefox) had to select everything from top to bottom and viceversa
- I watched my System Idle Time and the cpu load of the process "firefox.exe" in the taskmanager

What I saw was:
- The cpu load of the "firefox"-process peaked up to 69 percent, but was at least at around 40 percent.
- Any time the cpu load of this process changed, the system idle process went to 100 minus firefox-cpu-load. Examples: firefox: 63% - idle: 37% / firefox: 52% - idle: 48%

This was contradicting your explanation. I am running XP Pro SP2 (german). Maybe you can try to watch this phenomenon by yourself and try to embed this effect into your explanation.

Greetings from Hamburg

munk
munk is offline   Reply With Quote
Old September 13th, 2004 Top | #15
 
perris's Avatar
OSNN Godlike Veteran
Joined: January 2002
Location: new york
Posts: 12,280
Reputation: 4333
Power: 321

Default

your cpu percentage is changing as well, so percentages are going to vary according to delta of both cpu and process, not just process, plus other process delta, as any process that takes larger amounts of cpu, other processes change as well and take smaller percentages

system idle process represents the cycles that are not being used of whatever percent of the cpu is being used.


Perris Calderon of Carls fence.
perris is offline   Reply With Quote
Old September 14th, 2004 Top | #16
 
munk's Avatar
OSNN Junior Addict
Joined: September 2004
Posts: 4
Reputation: 0
Power: 0

Default

system idle process represents the cycles that are not being used of whatever percent of the cpu is being used.
Okay, I got that. But I still don't get the clou of what I can see.

Let's take it slow, example:

My firefox.exe takes 45% cpu load.
All other processes are almost idle, at very little above 0%.
Now I see the "system idle process" at 55%.

I understand your definition this way:
Of this 45% cpu load taken by firefox, 55% is taken by the idle process.

A few seconds later I see e.g. 64% cpu load used by firefox, and 36% of the idle process.
This means (by your definition) that of this 64% used by firefox, 36% is used by the idle process.

But why is the sum always 100? I could post some screenshots of what I mean.
munk is offline   Reply With Quote
Old September 14th, 2004 Top | #17
 
perris's Avatar
OSNN Godlike Veteran
Joined: January 2002
Location: new york
Posts: 12,280
Reputation: 4333
Power: 321

Default

post screeny...

on my box, firefox is only about 2%, and there are other processes that take cpu, like explorer, etc

re you tunning a priority on your firefox?


Perris Calderon of Carls fence.
perris is offline   Reply With Quote
Old September 15th, 2004 Top | #18
 
munk's Avatar
OSNN Junior Addict
Joined: September 2004
Posts: 4
Reputation: 0
Power: 0

Default

Well here it is:

("Leerlaufprozess" is the german term for "system idle process")

With Firefox:



With Internet Explorer:


With normal Explorer window:



Whenever I generate some CPU load, the sum in this task manager window is exactly 100.

Edit: If you can't get over 2% pressing Pos1 and End, try moving the mouse around as well.
munk is offline   Reply With Quote
Old September 15th, 2004 Top | #19
 
perris's Avatar
OSNN Godlike Veteran
Joined: January 2002
Location: new york
Posts: 12,280
Reputation: 4333
Power: 321

Default

I'm not following the question munk...the total has to equal 100%

whenever one process is using any cpu time on a sngle cpu system, no other process is..the total has to be 100%


Perris Calderon of Carls fence.
perris is offline   Reply With Quote
Old September 15th, 2004 Top | #20
 
munk's Avatar
OSNN Junior Addict
Joined: September 2004
Posts: 4
Reputation: 0
Power: 0

Default

Does this mean that it is not clear, how much total cpu load is used? Are these 100 percent not the one hundred percent my cpu could work? Is that what I misunderstood?

I'm not saying that you're wrong. I believe you're right. But if the task manager does not show the "real" load of my cpu it would be very useless.
munk is offline   Reply With Quote

Reply

Thread Tools

Posting Rules

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help with "system" process xalude Windows Desktop Systems 44 January 9th, 2008 12:30pm
Annoying "Generic Host Process" problem. Cen0x™ Windows Desktop Systems 8 August 18th, 2006 12:12am
"System" process causes CPU to jump to +50% every few minutes tk77 Windows Desktop Systems 30 August 17th, 2006 10:55pm
Help: System Idle Process stuck at 0% kriegman@aol.com Windows Desktop Systems 9 May 30th, 2005 4:59am
System Idle Process for WinXP A_Mersser Windows Desktop Systems 2 March 4th, 2003 9:44am