comp.lang.ada
 help / color / mirror / Atom feed
From: jsa@alexandria (Jon S Anthony)
Subject: Re: Tasking Techniques - Opinions?
Date: 1997/06/04
Date: 1997-06-04T00:00:00+00:00	[thread overview]
Message-ID: <JSA.97Jun4135001@alexandria> (raw)
In-Reply-To: 5n2hjr$ohm$1@news.pacifier.com


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





  parent reply	other threads:[~1997-06-04  0:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-06-04  0:00 Tasking Techniques - Opinions? Steve Doiel
1997-06-03  0:00 ` Tom Moran
1997-06-07  0:00   ` Steve Doiel
1997-06-04  0:00 ` Jon S Anthony [this message]
1997-06-04  0:00 ` bsanden
1997-06-04  0:00   ` Samuel A. Mize
1997-06-05  0:00     ` Jon S Anthony
1997-06-06  0:00       ` Samuel A. Mize
1997-06-07  0:00       ` Robert Dewar
1997-06-10  0:00         ` Jon S Anthony
1997-06-05  0:00 ` Robert A Duff
replies disabled

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