[fpc-pascal] Threading vs Parallelism ?

Michael Schnell mschnell at lumino.de
Thu Apr 13 10:12:16 CEST 2017


On 12.04.2017 14:09, Lars wrote:
> If unix could just make processes even lighter weight or
> faster loading, I might avoid threads and just use processes...
in Unix/Linux processes are not less "light" then threads. You can 
create a process by "fork". no "Loading" involved. it just creates the 
process. If you want to have the new process execute any code that is 
not shared with the you need to do another system call to replace the 
code with the new one. Moreover even if "loading" new code - in case 
another process already runs this file, no actual loading  takes place, 
either, as the memory management just uses the code page already in RAM.

This definitively is as light as it gets.

-Michael



More information about the fpc-pascal mailing list