Paul Rubin wrote:
> "Carl J. Van Arsdall" <[EMAIL PROTECTED]> writes:
>   
>> Processes seem fairly expensive from my research so far.  Each fork
>> copies the entire contents of memory into the new process.
>>     
>
> No, you get two processes whose address spaces get the data.  It's
> done with the virtual memory hardware.  The data isn't copied.  The
> page tables of both processes are just set up to point to the same
> physical pages.  Copying only happens if a process writes to one of
> the pages.  The OS detects this using a hardware trap from the VM
> system.
>   
Ah, alright.  So if that's the case, why would you use python threads 
versus spawning processes?  If they both point to the same address space 
and python threads can't run concurrently due to the GIL what are they 
good for?

-c

-- 

Carl J. Van Arsdall
[EMAIL PROTECTED]
Build and Release
MontaVista Software

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to