Re: basic thread question

2009-08-25 Thread sturlamolden
On 25 Aug, 13:33, Piet van Oostrum wrote: > I have heard about that also, but is there a Python implementation that > uses this? (Just curious, I am not using Windows.) On Windows we have three different versions of Python 2.6: * Python 2.6 for Win32/64 (from python.org) does not have os.fork.

Re: basic thread question

2009-08-25 Thread Piet van Oostrum
> sturlamolden (s) wrote: >s> On 25 Aug, 01:26, Piet van Oostrum wrote: >>> That's because it doesn't use copy-on-write. Thereby losing most of its >>> advantages. I don't know SUA, but I have vaguely heard about it. >s> SUA is a version of UNIX hidden inside Windows Vista and Windows 7 >s>

Re: basic thread question

2009-08-24 Thread sturlamolden
On 25 Aug, 01:26, Piet van Oostrum wrote: > That's because it doesn't use copy-on-write. Thereby losing most of its > advantages. I don't know SUA, but I have vaguely heard about it. SUA is a version of UNIX hidden inside Windows Vista and Windows 7 (except in Home and Home Premium), but very fe

Re: basic thread question

2009-08-24 Thread Piet van Oostrum
> sturlamolden (s) wrote: >s> On 24 Aug, 13:21, Piet van Oostrum wrote: >>> But os.fork() is not available on Windows. And I guess refcounts et al. >>> will soon destroy the sharing. >s> Well, there is os.fork in Cygwin and SUA (SUA is the Unix subsytem in >s> Windows Vista Professional). C

Re: basic thread question

2009-08-24 Thread sturlamolden
On 24 Aug, 13:21, Piet van Oostrum wrote: > But os.fork() is not available on Windows. And I guess refcounts et al. > will soon destroy the sharing. Well, there is os.fork in Cygwin and SUA (SUA is the Unix subsytem in Windows Vista Professional). Cygwin's fork is a bit sluggish. Multiprocessin

Re: basic thread question

2009-08-24 Thread sturlamolden
On 18 Aug, 22:10, Derek Martin wrote: > I have some simple threaded code...  If I run this > with an arg of 1 (start one thread), it pegs one cpu, as I would > expect.  If I run it with an arg of 2 (start 2 threads), it uses both > CPUs, but utilization of both is less than 50%.  Can anyone expla

Re: basic thread question

2009-08-24 Thread Piet van Oostrum
> Dave Angel (DA) wrote: >DA> Dennis Lee Bieber wrote: >>> On Sun, 23 Aug 2009 22:14:17 -0700, John Nagle >>> declaimed the following in gmane.comp.python.general: >>> >>> Multiple Python processes can run concurrently, but each process has a copy of the entire Python system, so

Re: basic thread question

2009-08-24 Thread Dave Angel
Dennis Lee Bieber wrote: On Sun, 23 Aug 2009 22:14:17 -0700, John Nagle declaimed the following in gmane.comp.python.general: Multiple Python processes can run concurrently, but each process has a copy of the entire Python system, so the memory and cache footprints are far larger than

Re: basic thread question

2009-08-24 Thread Piet van Oostrum
> Dennis Lee Bieber (DLB) wrote: >DLB> On Sun, 23 Aug 2009 22:14:17 -0700, John Nagle >DLB> declaimed the following in gmane.comp.python.general: >>> Multiple Python processes can run concurrently, but each process >>> has a copy of the entire Python system, so the memory and cache footprin

Re: basic thread question

2009-08-23 Thread John Nagle
Jan Kaliszewski wrote: 18-08-2009 o 22:10:15 Derek Martin wrote: I have some simple threaded code... If I run this with an arg of 1 (start one thread), it pegs one cpu, as I would expect. If I run it with an arg of 2 (start 2 threads), it uses both CPUs, but utilization of both is less than

Re: basic thread question

2009-08-19 Thread Sean DiZazzo
On Aug 18, 4:58 pm, birdsong wrote: > On Aug 18, 3:18 pm, Derek Martin wrote: > > > > > On Tue, Aug 18, 2009 at 03:10:15PM -0500, Derek Martin wrote: > > > I have some simple threaded code...  If I run this > > > with an arg of 1 (start one thread), it pegs one cpu, as I would > > > expect.  If I

Re: basic thread question

2009-08-18 Thread birdsong
On Aug 18, 3:18 pm, Derek Martin wrote: > On Tue, Aug 18, 2009 at 03:10:15PM -0500, Derek Martin wrote: > > I have some simple threaded code...  If I run this > > with an arg of 1 (start one thread), it pegs one cpu, as I would > > expect.  If I run it with an arg of 2 (start 2 threads), it uses b

Re: basic thread question

2009-08-18 Thread Derek Martin
On Tue, Aug 18, 2009 at 03:10:15PM -0500, Derek Martin wrote: > I have some simple threaded code... If I run this > with an arg of 1 (start one thread), it pegs one cpu, as I would > expect. If I run it with an arg of 2 (start 2 threads), it uses both > CPUs, but utilization of both is less than

Re: basic thread question

2009-08-18 Thread Jan Kaliszewski
18-08-2009 o 22:10:15 Derek Martin wrote: I have some simple threaded code... If I run this with an arg of 1 (start one thread), it pegs one cpu, as I would expect. If I run it with an arg of 2 (start 2 threads), it uses both CPUs, but utilization of both is less than 50%. Can anyone explain

Re: basic thread question

2009-08-18 Thread birdsong
On Aug 18, 1:10 pm, Derek Martin wrote: > I have some simple threaded code...  If I run this > with an arg of 1 (start one thread), it pegs one cpu, as I would > expect.  If I run it with an arg of 2 (start 2 threads), it uses both > CPUs, but utilization of both is less than 50%.  Can anyone expl

basic thread question

2009-08-18 Thread Derek Martin
I have some simple threaded code... If I run this with an arg of 1 (start one thread), it pegs one cpu, as I would expect. If I run it with an arg of 2 (start 2 threads), it uses both CPUs, but utilization of both is less than 50%. Can anyone explain why? I do not pretend it's impeccable code