comp.lang.ada
 help / color / mirror / Atom feed
* How can two tasks in different processors rendezvous?
@ 1995-01-26  4:25 mauricio cordeiro
  1995-01-30 13:49 ` Mats Weber
  1995-01-30 18:24 ` Theodore E. Dennison
  0 siblings, 2 replies; 5+ messages in thread
From: mauricio cordeiro @ 1995-01-26  4:25 UTC (permalink / raw)


We have 2 different Ada tasks running asynchronously in two different
workstations, and we need to transfer information from one to the other
(a kind of remote rendezvous...).
The workstations run Unix and are networked, but the compiler we have 
(SunAda), doesn't support any kind of RCP(remote procedure calls) or any
other similar facility. 

HOW CAN I DO IT ? ANY SUGGESTIONS ???? 

  _____________________________________________________

    Mauricio M. Cordeiro     | Work: (408) 656-3754
    Computer Science Dept.   | Fax : (408) 656-2814
    NAVAL POSTGRADUATE SCHOOL| Home: (408) 394-3743
    MONTEREY, CA  93943-2540 | cordeiro@cs.nps.navy.mil
  _____________________________________________________




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How can two tasks in different processors rendezvous?
  1995-01-26  4:25 How can two tasks in different processors rendezvous? mauricio cordeiro
@ 1995-01-30 13:49 ` Mats Weber
  1995-01-30 22:06   ` Ron Sercely
  1995-01-30 18:24 ` Theodore E. Dennison
  1 sibling, 1 reply; 5+ messages in thread
From: Mats Weber @ 1995-01-30 13:49 UTC (permalink / raw)


In article <D2zwAr.IqB@taurus.cs.nps.navy.mil>, cordeiro@cs.nps.navy.mil
(mauricio cordeiro) wrote:

> We have 2 different Ada tasks running asynchronously in two different
> workstations, and we need to transfer information from one to the other
> (a kind of remote rendezvous...).

You cannot do it with a rendez-vous. Ada's tasking model almost implies
shared memory between the processors executing the same Ada program.

Ada 83 has no built-in support for distributed systems. Many papers have
been written on the subject, but I don't have the references.

Ada 95 still uses the shared memory model for tasks, but offers an
additional mechanism for distributed systems, described in an annex of the
reference manual. It is based on RPC and is, IMO, very well done. I hope
someone will implement it for release with GNAT.

> The workstations run Unix and are networked, but the compiler we have 
> (SunAda), doesn't support any kind of RCP(remote procedure calls) or any
> other similar facility. 

In the meantime, there are several possibilities:

- Check out Paradise, a package offering TCP/IP communication primitives
to Ada programs, with special care given to tasks (so that your whole
program doesn't stop because one of its tasks is waiting for a Network
message). I haven't got the exact reference for Paradise (look at the
bindings section on the Ada WWW server <URL:http://lglwww.epfl.ch/Ada/>),
but I know it is available through anonymous ftp and released under the
GPL.

- Use SunRPC or access TCP/IP sockets directly (that is, write an Ada
binding to the relevant UNIX subprograms). This is quite easy if your
programs have no tasks but becomes very hard otherwise.

Mats



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How can two tasks in different processors rendezvous?
  1995-01-26  4:25 How can two tasks in different processors rendezvous? mauricio cordeiro
  1995-01-30 13:49 ` Mats Weber
@ 1995-01-30 18:24 ` Theodore E. Dennison
  1 sibling, 0 replies; 5+ messages in thread
From: Theodore E. Dennison @ 1995-01-30 18:24 UTC (permalink / raw)


cordeiro@cs.nps.navy.mil (mauricio cordeiro) wrote:
>
> We have 2 different Ada tasks running asynchronously in two different
> workstations, and we need to transfer information from one to the other
> (a kind of remote rendezvous...).
> The workstations run Unix and are networked, but the compiler we have 
> (SunAda), doesn't support any kind of RCP(remote procedure calls) or any
> other similar facility. 
> 
> HOW CAN I DO IT ? ANY SUGGESTIONS ???? 

Man, I should really become a consultant....


Ada 83, right?

There is no simple way to do this (in Ada 83). However, SunAda (1.1 at
least) allows interrupt entries:

A simple task could be written to accept interrupt entries, read a 
UNIX socket, and pass off the information to another Ada task via a
rendezvous. Another task (or subroutine) could be written to open up a
UNIX TCP/IP socket and wait for its data to be read. Voila: remote
rendezvous!

This is a bit of an oversimplification of the issues involved, but the
point is that it is quite doable if you have an experienced Ada person
who also happens to know UNIX networking. (If not, aquire one, or add
time for the learning curve).


T.E.D.
dennison@escmail.orl.mmc.com



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How can two tasks in different processors rendezvous?
  1995-01-30 13:49 ` Mats Weber
@ 1995-01-30 22:06   ` Ron Sercely
  1995-02-01 12:19     ` Robert Dewar
  0 siblings, 1 reply; 5+ messages in thread
From: Ron Sercely @ 1995-01-30 22:06 UTC (permalink / raw)


In article <Mats.Weber-3001951449570001@mlma11.matrix.ch>,
Mats Weber <Mats.Weber@matrix.ch> wrote:
>In article <D2zwAr.IqB@taurus.cs.nps.navy.mil>, cordeiro@cs.nps.navy.mil
>(mauricio cordeiro) wrote:
>
>> We have 2 different Ada tasks running asynchronously in two different
>> workstations, and we need to transfer information from one to the other
>> (a kind of remote rendezvous...).
>
>You cannot do it with a rendez-vous. Ada's tasking model almost implies
>shared memory between the processors executing the same Ada program.
>
>
>Mats

Well, Yes and No.

Yes, you _could_ do it, if it was provided by your Ada vendors run-time.
No, you can't do it, in that I know of no vendor that provides a run-time FOR
WORKSTATIONS. 

However, if executing on a Convex Computer, which has 8 cpus, the tasks DO
distribute across the cpus, and they DO rendevous just fine.

Ron Sercely




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How can two tasks in different processors rendezvous?
  1995-01-30 22:06   ` Ron Sercely
@ 1995-02-01 12:19     ` Robert Dewar
  0 siblings, 0 replies; 5+ messages in thread
From: Robert Dewar @ 1995-02-01 12:19 UTC (permalink / raw)


Ron, of course you can distribute tasks in a multi-processor like the
Convex. Other work stations with multi-processor modems (SGI, Sun etc)
also provide this capability, because these are shared memory machines.

The question was whether you can do RV between processors with separate
memory (e.g. separate work stations). 

The answer is conceptually yes, but practically no. It would be possible
to provide a virtual implementation of the conceptually shared address
space, so that for example and plain assignment statement would involve
access to the network to access the referenced variables, but in practice
this is not a reasonable implementation and no one has attempted it.

So the answer to the original question is definitely NO in practice, you
cannot use RV between separate machines. However, the distributed annexe
of Ada 95 definitely gives the capability of separate tasks on separate
machines (actually separate partitions) communicating. Some of you may
have seen the GNAT demo at Tri_Ada, where we were demonstrating a single
program running in a distributed manner on two SGI work stations and
one Sun work station.




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~1995-02-01 12:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1995-01-26  4:25 How can two tasks in different processors rendezvous? mauricio cordeiro
1995-01-30 13:49 ` Mats Weber
1995-01-30 22:06   ` Ron Sercely
1995-02-01 12:19     ` Robert Dewar
1995-01-30 18:24 ` Theodore E. Dennison

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