Hi,
        I've been working with SMP from the hardware side for several years
now, but am somewhat new to the applications side.  Here's my situation.

I have a CPU intensive task that takes 2-3 min on a 300MHz PIII.  The
timing of each run is data dependent thus can't be predicted precisely. 
I need to run as many of these processes as possible usring my repeat
interval, which is 30 minutes at the moment.  These processes are
launched by a shell script, which itself is called by cron.

Trouble comes when the compute time for all the processes excedes the
repeat interval.  If I try to do 35 minutes of computation every 30
minutes, the number of processes increase and the system eventually
grinds to a halt.  To counter this on a uni-processor system, I had the
script touch a lockfile and then refuse to run if another process was
running.

        I tried this on a dual CPU system and had to make 2 separate scripts
with 2 lockfiles.  It seemed ugly, for example I had to maintain 2
separate lists of tasks, but it worked.

        Now I have a quad CPU system (VARserver3500 from VA Research) and I'm
looking for a more elegant way to approach the problem.  Given some
relatively large number of tasks (50-100?)  how can I make sure that
there are always N=2,4,8, of them running?

Any advice on where to look for info on this type of problem is
appreciated,

Terry Bullett
-
Linux SMP list: FIRST see FAQ at http://www.irisa.fr/prive/mentre/smp-faq/
To Unsubscribe: send "unsubscribe linux-smp" to [EMAIL PROTECTED]

Reply via email to