multiprocessing vs thread performance

Aaron Brady castironpi at gmail.com
Tue Dec 30 09:29:19 EST 2008


On Dec 29, 9:08 pm, "James Mills" <prolo... at shortcircuit.net.au>
wrote:
> On Tue, Dec 30, 2008 at 12:52 PM, Aaron Brady <castiro... at gmail.com> wrote:
> > On Dec 29, 7:40 pm, "James Mills" <prolo... at shortcircuit.net.au>
> > wrote:
> >> On Tue, Dec 30, 2008 at 11:34 AM, Aaron Brady <castiro... at gmail.com> wrote:
> >> > The OP may be interested in Erlang, which Wikipedia (end-all, be-all)
> >> > claims is a 'distribution oriented language'.
> > snip
> >> I'm presently looking at Virtual Synchrony and
> >> other distributed processing architectures - but
> >> circuits is meant to be general purpose enough
> >> to fit event-driven applications/systems.
>
> > I noticed a while ago that threads can be used to simulate
> > generators.  'next', 'send', and 'yield' are merely replaced by
> > synchronizor calls (coining the term).
>
> > Not the other way around, though, unless the generator guarantees a
> > yield frequently.  'settrace' anyone?
>
> Aaron, circuits doesn't use generators :)
> What did your comment have to do with this ?
>
> I have often seen generators used to
> facilitate coroutine and coooperative
> programming though.
>
> cheers
> James

James, Hi.  I'm glad you asked; I never know how "out there" my
comments are (but surmise that feedback is always a good thing).  What
I was thinking was, I didn't know Virtual Synchrony, and I've never
used Erlang, but I'm interested in concurrency especially as it
pertains to units of work, division of labor, and division of context;
and generators are another way to divide context.  So: I wanted to put
more of my background and interests on the table.  What I said wasn't
directly relevant, I see.  But it's not like I
"dissertated" (discussed) the Tibettan-Austrian spice trade.  I think
I just want to say stuff about threading!  Maybe I'm just excited to
meet people who share my interests... not unheard of.

In Economics, you can divide a market into vertical and horizontal
dimensions, vertical being the chain from raw resources to finished
products, and horizontal being market coverage.  With a similar
division in tasks, horizontal units would handle incoming events,
prepare them, then pass them on to a next unit, which processes a
little, then passes it on, like an assembly line (bucket brigade/
alternating current); and vertical units would take one incoming
event, and see it through start to finish (direct current).  You don't
have to use that depiction.

The terminology is transposed from that of a distributed matrix
multiplication task depiction, where horizontal works start-to-finish,
and vertical takes handoffs from its predecessor.

'Circuits' doesn't use generators.  I think generators are an
underexplored technique.  Is 'circuits' assembly line or start-to-
finish, if my analogy makes any sense?  'Circuits' is event-driven,
but I don't see any difference between 'event-driven' and
multithreaded in general.  (I think contrast can create a good picture
and a clear understanding.)  What is special about an 'event-driven'
architecture?  Are you distinguishing blocking from polling?



More information about the Python-list mailing list