dual processor

Michael Sparks ms at cerenity.org
Wed Sep 7 14:39:49 EDT 2005


Jorgen Grahn wrote:

> On Tue, 06 Sep 2005 08:57:14 +0100, Michael Sparks <ms at cerenity.org>
> wrote: ...
>> Are you so sure? I suspect this is due to you being used to writing code
>> that is designed for a single CPU system. What if you're basic model of
>> system creation changed to include system composition as well as
>> function calls? Then each part of the system you compose can potentially
>> run on a different CPU. Take the following for example:
> ...
>> It probably looks strange, but it's really just a logical extension of
>> the Unix command line's pipelines to allow multiple pipelines. Similarly,
>> from a unix command line perspective, the following will automatically
>> take advantage of all the CPU's I have available:
>>
>>    (find |while read i; do md5sum $i; done|cut -b-32) 2>/dev/null |sort
>>
>> And a) most unix sys admins I know find that easy (probably the above
>> laughable) b) given a multiprocessor system will probably try to maximise
>> pipelining c) I see no reason why sys admins should be the only people
>> writing programs who use concurrency without thinking about it :-)
> 
> Nitpick: not all Unix users are sysadmins ;-) Some Unix sysadmins actually
> have real users, and the clued users use the same tools. I used the 'make
> -j3' example elsewhere in the thread (I hadn't read this posting when I
> responded there).

I simply picked a group that do this often :-) The example pipeline I gave
above is I admit a particularly dire one. Things like the following are far
more silly:

# rm file; fortune | tee file | wc | cat - file
      3      16     110
Bubble Memory, n.:
        A derogatory term, usually referring to a person's
intelligence.  See also "vacuum tube".

And

# (rm file; (while [ ! -s file ]; do echo >/dev/null; done; cat file |wc) & fortune | tee file) 2>/dev/null
Yea, though I walk through the valley of the shadow of APL, I shall
fear no evil, for I can string six primitive monadic and dyadic
operators together.
                -- Steve Higgins
#       4      31     171

> It seems to me that there must be a flaw in your arguments, but I can't
> seem to find it ;-)

Sorry, but that's probably the funniest thing I've read all day :-)

Best Regards,


Michael.




More information about the Python-list mailing list