Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 11-22-2006, 04:09 AM   #1
Registered: Sep 2005
Location: india
Distribution: Fedora Core 2
Posts: 62

Rep: Reputation: 15
how to make CPU idle?

Hi Folks,
How are you guys?
I want running Linux 2.4.19 kernel and I want to put CPU in sleep mode I mean I want to make CPU IDLE for say 10 secs. inside my module. We can acheive it in Linux 2.6 kernel using msleep () function but as there is no msleep () available in Linux 2.4.19, how can I do that?
Is there some function to make CPU idle for some time?
Please help. I need to know about this very urgently.

Thanks and best regards,
Old 11-22-2006, 07:52 AM   #2
Registered: Jun 2005
Location: On the top of the World
Posts: 114

Rep: Reputation: 15
well you can use sleep command,,

just make a small shell script and use sleep function in it..

Job done..


Harinder Singh.
Old 11-23-2006, 05:21 AM   #3
Registered: Sep 2005
Location: india
Distribution: Fedora Core 2
Posts: 62

Original Poster
Rep: Reputation: 15
Hi Saini
Thanks for the reply. But I cannot write script and use sleep command as I want to sleep inside a module like in a driver.

But I have got one way that I can use schedule_timeout (jiffies).
But here the problem is with the argument. Its in number of jiffies and not in msecs or usecs. So if I want to sleep for say 10 secs then what should be the argument? Can someone please help me in this regard?
Need to know urgently.
Thanks and Regards


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cpu load at 59% when idle stubbe Linux - General 12 09-26-2006 01:15 PM
script to get cpu usage idle % LinToWinWin Linux - Software 7 03-23-2006 01:34 AM
CPU states, low idle % branden_burger Linux - Hardware 1 10-21-2005 04:37 PM
CPU idle binumvk Linux - Security 0 10-16-2004 04:19 AM
High load - but CPU 99% idle? Boss Hoss Linux - Hardware 6 05-24-2004 04:39 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:24 PM.

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