comp.lang.ada
 help / color / mirror / Atom feed
From: bsanden@acm.org
Subject: Re: Tasking Techniques - Opinions?
Date: 1997/06/04
Date: 1997-06-04T00:00:00+00:00	[thread overview]
Message-ID: <3394ecbe.215389049@news.pcisys.net> (raw)
In-Reply-To: 5n2hjr$ohm$1@news.pacifier.com


On 4 Jun 1997 01:49:47 GMT, steved@pacifier.com (Steve Doiel) wrote:

>For example:
>I am working on a communications subsystem.  In this subsystem
>various tasks produce packages of data that are to be transmitted
>using BSD sockets on TCP/IP.
>
>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.
>
>In the above description the gory details of how the socket
>initially gets set up, what happens when a socket goes away,
>and other error handling are left out to keep the discussion
>simple.
>
>Now the question:
>Is this a reasonable implementation?  Or is there a better
>approach?
>
>I am making almost no use of Ada's "rendevous," and am leaning
>more toward using protected types to pass data through queues.
>
>Is this poor practice?  I understand that with Ada 83 this
>was not an option, but still wonder if this is the best approach.
>
>Opinions?
>
Sounds perfectly reasonable to me. Ada 83 forced many more tasks into
the designs than were actually justified by real concurrency. The
protected objects have made this much more palatable. Letting tasks
communicate via shared objects is also the traditional way of doing
these things. 




Prof. Bo Sanden
Colorado Technical University 
4435 N. Chestnut Street
Colorado Springs, CO 80907-3896
Email: bsanden@acm.org
Http://www.isse.gmu.edu/faculty/bsanden




  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
1997-06-04  0:00 ` bsanden [this message]
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