Re: Activating a daemon during idle time

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jan 21, 2002 at 07:37:20AM -0800, Swapnil Nagle wrote:
 > I am coding a daemon which i want to activate when the system is idle. 
 > ...
 > * make the daemon a low priority

 This is the best way to go about this. Note that the current
 scheduler still schedules this job quite often even during
 something CPU intensive like a make -j. Ingo's O(1) scheduler
 has now changed this so that these jobs get an even smaller
 timeslice. So whilst not perfect, it's probably as close as
 you're going to get to a "schedule me when the system is idle"

 Depending on what your daemon is doing, you may be able to get
 it to block on a socket/fd or the likes which would be the
 perfect way to get the process to consume no cpu until the event
 occurs. See select() and friends.
 
-- 
Always code as if the guy who ends up maintaining your code will be
violent psychopath who knows where you live. -- John F. Woods
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
IRC Channel:   irc.openprojects.net / #kernelnewbies
Web Page:      http://www.kernelnewbies.org/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux