On Sat, 7 Aug 2004, blake wrote:

> 
> I have written a graphics program that works on a color picture using 
> three separate planes of color, where the processing for each can be 
> done simultaneously. Currently the program takes about fifteen hours to 
> complete under 18e, and, I hope, only about 4 hours under the new 19a. 
> I have a dual processor machine and I thought that I might be able to 
> halve my processing time further by using mp::make-process to divide the 
> problem up, running a separate process for each color plane.   But I did 
> this, I found that it seemed to make no difference whether I use 
> mp::make-process to run the calculations simultaneously or to just run 
> them serially one after another.  When I look at the output of the 'ps 
> -avx' I also only see one lisp process running.
> 
> Does the multi-threading actually allow the separate threads to run on 
> different processors?  If so, how do I find out how this is done?

The multithreading package found in CMUCL do not use kernel threads, so 
even if you starts a lot of processes, you will still only use one 
processor, as you could see from 'ps'. 

 
> As an alternative, should I just create separate lisp programs to run 
> each plane?  (I had hoped to be able to share some of the common data 
> structures used by each color plane.  An entirely separate program would 
> make this more difficult.)

I have used fork for some tasks like this. In that case you can use the 
datastructures as they where before the fork, but you can't use data 
generated during the processing of the two other planes, and you can't 
even merge the result afterwoods, unless you either write each plane to 
file or use a pipe to communicate or similar tricks. This can be quite 
hairy. I have some code for doing this if you are interested.

SBCL has an (experimental) module for doing kernel-threads 
multiprocessing.

--
Gisle S�lensminde
Computational biology unit, University of Bergen, Norway
Email: [EMAIL PROTECTED]



Reply via email to