Beginner Threaded file reading access

Cameron Laird claird at lairds.com
Sat Mar 27 13:16:51 CET 2004


In article <c4393i$gbr$1 at news.service.uci.edu>,
Josiah Carlson  <jcarlson at nospam.uci.edu> wrote:
>> Multithreading will not help this sequence unless (A) you have multiple
>> processors, or (B) the processing in bar() needs to wait for something.  If
>> bar() is CPU bound, you would get the same performance by just executing
>> sequentially.
>
>It is even worse than that.  In windows, Python is really a single 
>process, and no amount of threading is going to let one instance of 
>Python use more than 100% of a single CPU.  I'm not sure if this is also 
>the case with linux or OS X.
>
>  - Josiah

Go through this with me.  I agree with your conclusion, and I
don't keep up with Windows engineering.  Moreover, I think it's
important that we educate the masses that multithreading in-
herently *slows* operations on a single CPU.  However, I was
sure that Windows *does* include the ability to distribute
intraprocess native threads across SMP.  Am I misreading you?
Are you making the point that Python's use of Windows threads
only provides for concurrency between, in practice, one I/O
and one computational operation?  
-- 

Cameron Laird <claird at phaseit.net>
Business:  http://www.Phaseit.net



More information about the Python-list mailing list