comp.lang.ada
 help / color / mirror / Atom feed
From: Jim Rogers <jimmaureenrogers@worldnet.att.net>
Subject: Re: Are rendezvous dead?
Date: Mon, 15 Apr 2002 16:09:33 GMT
Date: 2002-04-15T16:09:33+00:00	[thread overview]
Message-ID: <3CBAFB35.40102@worldnet.att.net> (raw)
In-Reply-To: 4519e058.0204150604.2e65daca@posting.google.com

Ted Dennison wrote:

> I personally find them complementary, not competative with each other.


I agree. Each feature still has a valid place in Ada syntax and usage.


> What you can now do in Ada 95 is use tasks *only* for those entities
> that logically contain their own thread of control, without having to
> create a lot of extra fluff tasks.
> 
> In a multi-threaded algorithm you generally want to have each task
> designated as either a client or a server. There are some exceptions,
> but it is usually a very bad idea to make a task that tries to be
> both.


One example of a design needing tasks to be both clients and servers
is a concurrent command and control system. When I was doing robotics
work with Ada we found that much of our design was devoted to
message translation and distribution.  For instance, one control on
the Operator Control Unit was a joystick. That joystick controlled
speed and direction of the robotic vehicle. One joystick message
was distributed among controls for throttle, brakes, steering, and
transmission. Steering messages were customized for the vehicle
type being controlled. Turning a tracked vehicle requires one track
to be stopped (with a brake command) while the other continues
running. This produces a moderate turning diameter. For tight turns
one track is run in a forward direction while the other is run in a
reverse direction, requiring both brake and transmission commands.
Steering a wheeled vehicle simply involves turning the steering wheel.

In the case of the tracked vehicle, the steering task must be a client
to the operator control unit, receiveing a steering message. It must
then translate that steering message into either a combination of
braking, transmission, and throttle control commands, acting as a
server for the braking, transmission, and throttle commands.

Of course, we did use protected objects between our tasks. This
allowed a brake task, for example, to receive its messages from many
other tasks, and process them in a FIFO manner.

Tasks not directly involved in message distribution commonly
communicated using rendezvous.

Jim Rogers




  reply	other threads:[~2002-04-15 16:09 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-14  8:42 Are rendezvous dead? Anatoly Chernyshev
2002-04-14 10:55 ` Dmitry A.Kazakov
2002-04-14 14:00 ` Pat Rogers
2002-04-15 13:38   ` Marin David Condic
2002-04-14 19:52 ` Robert Dewar
2002-04-16  8:48   ` John McCabe
2002-04-15 14:04 ` Ted Dennison
2002-04-15 16:09   ` Jim Rogers [this message]
2002-04-15 16:36     ` Jean-Pierre Rosen
replies disabled

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