On 09/18/2010 06:08 PM, Dariusz Mazur wrote:
with CILK approach we deal with task, not threads.
IMHO this does not make much sense.
For the user-programmer, the relevant difference between tasks and threads is that thread share memory.
This results in the increasing complexity with mutually accessed variables which of course provides a real challenge.
But you can think of a programming paradigm (=CILK") that does not allow the user programmer to share the variables between the "tasks" even though the "tasks" in fact are threads as far as the OS is concerned.
Not the tasks switch is done with a lot less overhead as the OS does not need to change the environment (such as MMU tables), the cache is used more efficiently (especially on ARM as here the cache needs to be cleared with each change in the MMU tables).
The communication between the tasks (here done not by the user but by would be automated the system (e.g. CILK) would be a lot faster when it uses threads instead of processes, as it could easily make uses of shared memory (though hidden from the user).
Moreover, while debugging multiple threads is more difficult than debugging single threaded applications, parallel debugging of multiple applications is still more heavy.
-Michael -- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
