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=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,98fcd569e727e97c X-Google-Attributes: gid103376,public From: jsa@alexandria (Jon S Anthony) Subject: Re: Tasking Techniques - Opinions? Date: 1997/06/04 Message-ID: #1/1 X-Deja-AN: 246103966 Distribution: world References: <5n2hjr$ohm$1@news.pacifier.com> Organization: PSI Public Usenet Link Newsgroups: comp.lang.ada Date: 1997-06-04T00:00:00+00:00 List-Id: In article <5n2hjr$ohm$1@news.pacifier.com> steved@pacifier.com (Steve Doiel) writes: > In the current implementation, one module maintains a free pool > of packet buffers. Access to the free pool is done using a > protected type. A second module contains a protected type that > contains a FIFO of packet buffers (the send queue). A third > module contains a "send task" that is in a short loop that > removes entries from the send queue, transmits the data out the > socket and then returns the packet buffer to the free pool. ... > Now the question: > Is this a reasonable implementation? Or is there a better > approach? Sounds pretty reasonable to me. There are a couple of bits that you haven't mentioned. What populates the send queue? How does the send task know there is anything in the queue? This could be done by using another task which populates the send queue and then signals the send task that there is something to do (it is waiting on a "start working" entry). The send task removes and sends stuff until the queue is empty and then goes back to waiting. This might not happen, as the populator task should be able to continue adding stuff (it would only signal the send task if the queue were empty). Which brings up another point: some sort of flow control in case the populator is faster than the sender. Anyway, sounds basically on the right track. /Jon -- Jon Anthony Organon Motives, Inc. Belmont, MA 02178 617.484.3383 jsa@organon.com