Dave,
Interesting thoughts about context switching. But, correct me if I'm
wrong, I guess that in a multi processor environment, this may be quite
complicated since two (or more) threads are *really* executed in
parallel. Right?
Regards
Gustav
Dave Ihnat wrote:
>
> Gustav Schaffter wrote:
>
> > I think the best live example would build on the event driven
> > application mentioned by Dave here.
>
> Yes, that works. And I do want to point out that such applications
> can be written _without_ threads--and in fact have been for decades.
> Instead, you use signals; something like software interrupt vector
> routines.
>
> Same problems, different decade, different solution...
>
> > And as Dave also touched, to communicate between threads in the same
> > application, the programmer is *strongly* encouraged to use IPC
> > mechanisms, such as pipes, queues, etc.
>
> Of course, one of the "strengths" of threads is that it all happens
> within the same system process space--no context switches. Using
> IPC mechanisms trigger context switches, so there have been efforts
> to do test-and-set mechanisms that are only valid within the context of
> the current process (and its set of threads.) Just an observation.
>
> Cheers,
> --
> Dave Ihnat
> [EMAIL PROTECTED]
--
pgp = Pretty Good Privacy. To get my public pgp key, send an e-mail to:
[EMAIL PROTECTED]
Visit my web site at http://www.schaffter.com
--
To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
as the Subject.