[fpc-devel] Light weight threads for FPC

Michael Schnell mschnell at lumino.de
Mon Dec 17 09:41:43 CET 2007


IMHO the language itself might be enhanced for parallel processing.

The implementation should be done in the RTL (or supposedly rather a 
special library). Here the methods of distributing potentially parallel 
tasks on "executors" is defined. It should work according to a set of 
parameters (e.g. Count of available processors, a parameter list for the 
processors (e.g. speed), a penalty estimation for starting an "executor" 
(small for lightweight threads, high for cluster machines), ...)  
Moreover the library of course holds the code to create thread pools, 
assign tasks to threads, transport parameters to the thread, retrieve 
results from an "executor", etc.

A first implementation of course should just provide (light weight) 
threads (supposedly with a thread pool at least in Windows). Maybe the 
only primary tuning parameter being the count of CPUs. But it should be 
done in a way, that it can be extended to more sophisticated parameters 
and finally to cluster controlling, just by enhancing the library code.

IMHO, all this should not impose any problems for the implementation 
with "light weight threads".

-Michael





More information about the fpc-devel mailing list