Threads vs Processes

bryanjugglercryptographer at yahoo.com bryanjugglercryptographer at yahoo.com
Fri Jul 28 17:33:59 EDT 2006


sturlamolden wrote:
> A noteable exception is a toy OS from a manufacturer in Redmond,
> Washington. It does not do COW fork. It does not even fork.
>
> To make a server system scale well on Windows you need to use threads,
> not processes.

Here's one to think about: if you have a bunch of threads running,
and you fork, should the child process be born running all the
threads? Neither answer is very attractive. It's a matter of which
will probably do the least damage in most cases (and the answer
the popular threading systems choose is 'no'; the child process
runs only the thread that called fork).

MS-Windows is more thread-oriented than *nix, and it avoids this
particular problem by not using fork() to create new processes.

> That is why the global interpreter lock sucks so badly
> on Windows.

It sucks about he same on Windows and *nix: hardly at all on
single-processors, moderately on multi-processors.


-- 
--Bryan




More information about the Python-list mailing list