From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,956e1c708fea1c33 X-Google-Attributes: gid103376,public From: Corey Minyard Subject: Re: Looking for implementation idea Date: 1999/02/07 Message-ID: #1/1 X-Deja-AN: 441793619 Sender: minyard@wf-rch.cirr.com References: <36BD749B.DA735DB7@umundum.vol.at> <36bded94.1470027@news.pacbell.net> Organization: Wonderforce Research Reply-To: minyard@acm.org Newsgroups: comp.lang.ada Date: 1999-02-07T00:00:00+00:00 List-Id: 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