On Tuesday, July 15, 2003 6:06 pm -0700 Rich Morin <[EMAIL PROTECTED]> wrote:

I'm putting together a scheduler to control a slew of "soft real time"
activities.  That is, there will be all sorts of things going on; some
things may be scheduled as often as once per second, but most won't.

I can think of several ways to implement this, but each seems to have
pluses and minuses:

* Spawn a process for each activity.

      I'm quite familiar with this approach, and I like the fact that
      I can set the nice(2) value for each process independently.  I
      don't like the overhead of starting up Perl interpreters, tho...

If you fork() you avoid both that overhead and the overhead of compiling your code to bytecode. And while you can't nice a process that you are forking off, you could do something like system("renice $niceness -p $$") in the new process.


--
David Cantrell

Reply via email to