LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 03-09-2009, 08:03 AM   #1
kinkle
LQ Newbie
 
Registered: Mar 2009
Location: MN
Distribution: Debian squeeze
Posts: 13

Rep: Reputation: 3
Idle time vs program time


I have read that there is really no such thing as real idle time since the CPU calculates idle time using idle loops, therefore the CPU is always at 100% use.

So what does this mean? It doesn't matter at all leaving the computer alone with nothing to do than playing a super-resource-intensive game???

I'm saying this because I wish to use my computer for Distributed Computing and was wondering that if idle time really does not exist, then at least use it for a good cause rather than for idle loops. My computer only uses about 10% of its CPU normally, so I was planning to dedicate another 10% for DC. So does this mean I can dedicate 90% for DC and it wouldn't matter since it would be used for idle loops anyway?

Any expertise on the subject?
 
Old 03-09-2009, 08:07 AM   #2
eco
Member
 
Registered: May 2006
Location: BE
Distribution: Debian/Gentoo
Posts: 410

Rep: Reputation: 48
I'm no expert in this but a simple proof that what you are saying is wrong is the heat and fan speed. You're CPU is cooler when idle and the fan is slower so... there is a difference
 
Old 03-09-2009, 09:43 AM   #3
SlowCoder
Member
 
Registered: Oct 2004
Location: Southeast, U.S.A.
Distribution: Fedora (Desktop), CentOS (Server), Knoppix (Diags)
Posts: 934

Rep: Reputation: 38
This is a very good question. I've always wondered the same thing. On top of the idle loop, the processor is always polling for I/O data to process from the hardware. But obviously the idle processing isn't nearly as intensive as hardcore gameplay (or Excel ).
 
Old 03-09-2009, 10:40 AM   #4
rweaver
Senior Member
 
Registered: Dec 2008
Location: Independance, OH
Distribution: Debian, CentOS, Slackware, RHEL, Gentoo
Posts: 1,833

Rep: Reputation: 160Reputation: 160
Quote:
Originally Posted by kinkle View Post
I have read that there is really no such thing as real idle time since the CPU calculates idle time using idle loops, therefore the CPU is always at 100% use.

So what does this mean? It doesn't matter at all leaving the computer alone with nothing to do than playing a super-resource-intensive game???

I'm saying this because I wish to use my computer for Distributed Computing and was wondering that if idle time really does not exist, then at least use it for a good cause rather than for idle loops. My computer only uses about 10% of its CPU normally, so I was planning to dedicate another 10% for DC. So does this mean I can dedicate 90% for DC and it wouldn't matter since it would be used for idle loops anyway?

Any expertise on the subject?
Calculating idle time is very gentle hardware wise, it's saying "I've got this much free because I've got nothing better to do." Most of the distributed computing applications have settings that say "only utilize x%age of the idle time" or "only when idle" in some form or another.
 
Old 03-11-2009, 09:57 PM   #5
sundialsvcs
Senior Member
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 3,681

Rep: Reputation: 329Reputation: 329Reputation: 329Reputation: 329
Actually, the computer does not "loop" to calculate idle-time.

When the dispatcher finds that it has no work to do, it stores the current time-of-day clock value and then (conceptually...) halts the CPU. When it's ready to resume doing work, it captures the new time-of-day value and subtracts it from the previously stored value. The difference between the two is the amount of time the CPU has been idle, and this is added to idle-time accumulator.

It is entirely normal for any given CPU to spend most of its time "idle," because most things are somehow constrained by the speed of some physical device. Microseconds add up fast.

The actual processing is somewhat more complicated, especially in multi-core/multi-CPU situations, but this simple explanation will suffice.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Making a program only use idle time. pxumsgdxpcvjm Programming 2 10-05-2008 07:29 PM
finding login time and idle time,..etc from a list of users knavramesh Linux - Newbie 2 10-02-2008 10:55 PM
Find X idle time jlinkels Linux - Software 2 01-25-2007 06:02 PM
Idle Time in KDE elconde Linux - Software 2 05-19-2006 06:12 AM
IDLE time for DSL metallica1973 Linux - Networking 0 02-22-2005 11:06 AM


All times are GMT -5. The time now is 11:24 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration