comp.lang.ada
 help / color / mirror / Atom feed
From: Corey Minyard <minyard@acm.org>
Subject: Re: Looking for implementation idea
Date: 1999/02/07
Date: 1999-02-07T00:00:00+00:00	[thread overview]
Message-ID: <m2ogn5hovr.fsf@wf-rch.cirr.com> (raw)
In-Reply-To: 36bded94.1470027@news.pacbell.net

tmoran@bix.com (Tom Moran) writes:

> >Not just in Ada, but generally.  IMHO, using tasking will have three
> >general effects on your system:
> 
> >   1) It will be more complex
> 
> >   2) It will be less efficient
> 
> >   3) It will be less reliable
> (1) depends on how independent the tasks are.  It they need to talk to
> each other, yes, that can get complex.  If each port/socket is
> essentially independent, and each can be run by a separate task that
> blocks on IO, the design can be very simple.
> (2) depends on the frequency of context switches. With the compilers I
> have tried, on MS Windows, switch times are in the tens of
> microseconds.  If you do that a lot, it's bad, but if you do it once
> per millisecond, you're only talking a few percent of CPU.
> (3) depends a lot on (1), complexity.  If it's simple, it's easy to
> design it to be reliable, even if timing dependencies make it hard to
> test it to be reliable.  If it's complex, it's harder to design
> reliability, and perhaps it is worth cutting down on timing
> dependencies to simply testing.
> My $.02

I realized I should have spoken to this after I replied.  If the
individual tasks are completely independent, then it might make sense
to split them up (ignoring overload and efficiency concerns, of
course).  Then they are really more like multiple instances of the
same application running.  Then complexity would probably go down by
splitting them up.  Thanks for pointing that out.

It will almost always be less efficient, even if it only does one more
context switch.  Just not much less efficient.  But when you are
talking about handling thousands of messages a second, context
switches can become very expensive.  I know from experience.

-- 
Corey Minyard                   Internet:  minyard@acm.org
  Work: minyard@nortelnetworks.com  UUCP:  minyard@wf-rch.cirr.com




  reply	other threads:[~1999-02-07  0:00 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-02-07  0:00 Looking for implementation idea Thomas Handler
1999-02-07  0:00 ` Paul Duquennoy
1999-02-08  0:00   ` Thomas Handler
1999-02-07  0:00 ` Corey Minyard
1999-02-07  0:00   ` Tom Moran
1999-02-07  0:00     ` Corey Minyard [this message]
1999-02-07  0:00   ` Larry Kilgallen
1999-02-08  0:00     ` dewar
1999-02-08  0:00       ` dennison
1999-02-08  0:00         ` robert_dewar
1999-02-07  0:00   ` Tucker Taft
1999-02-07  0:00     ` Corey Minyard
1999-02-08  0:00       ` Tucker Taft
1999-02-07  0:00         ` Corey Minyard
1999-02-08  0:00       ` robert_dewar
1999-02-08  0:00     ` dennison
1999-02-08  0:00       ` robert_dewar
1999-02-08  0:00       ` Tucker Taft
1999-02-09  0:00         ` robert_dewar
1999-02-11  0:00           ` Ehud Lamm
1999-02-08  0:00   ` Thomas Handler
1999-02-07  0:00 ` Niklas Holsti
1999-02-08  0:00   ` Thomas Handler
1999-02-09  0:00     ` Niklas Holsti
1999-02-10  0:00       ` Thomas Handler
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox