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...
* Start up a thread for each activity.
This has lower overhead than the "process" approach, but there doesn't seem to be any way to set independent nice(2) values.
Q: Will Perl 5.8.1 (promised in Panther) have kernel threads?
* This has the lowest overhead, but (a) each activity must complete before another can start up and (b) there is NO chance for one task to get work done while another is waiting on a system call.
Comments? Clues? Suggestions?
-r -- email: [EMAIL PROTECTED]; phone: +1 650-873-7841 http://www.cfcl.com/rdm - my home page, resume, etc. http://www.cfcl.com/Meta - The FreeBSD Browser, Meta Project, etc. http://www.ptf.com/dossier - Prime Time Freeware's DOSSIER series