[gclist] Re: gclist-digest V3 #84

Burton, Joshua jburton@Rational.Com
Wed, 21 Jun 2000 17:51:14 -0500

David Chase wrote:

> >The unglamorous way of saying this is: "You have just re-invented the
> >process."
> Yes and no.  OS Interprocess communication is typically quite expensive.

Depends on the OS, of course.  Threads are useful iff:

(1) Coroutines are too small (you can't trust me to yield to you), BUT
(2) Processes are too big (you trust me to dance all over your memory).

Those two conditions are paradoxical enough that there had better be an
actual performance win (that meets an actual and measurable need) before
you set up camp in the middle.  On single processors with an OS that
implements processes efficiently as kernel threads, such wins are hard
to come by.

Of course, if you have to coexist with a multithreaded 3rd-party package....

There will be always Evils, which   +-------------------------------------+
no Arte of Man can cure, Breaches   |  Joshua W. Burton    (847)677-3902  |
and Leakes moe then mans Wit hath   |         jwb@post.harvard.edu        |
Hands to stop.  -- Hooker (1597)    +-------------------------------------+