comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Does GNAT support a thread-free RTS?
Date: Tue, 13 Sep 2011 14:18:38 +0200
Date: 2011-09-13T14:18:38+02:00	[thread overview]
Message-ID: <fsqw02e0of5u.1lap7deczs8$.dlg@40tude.net> (raw)
In-Reply-To: 4e6f24c4$0$7629$9b4e6d93@newsspool1.arcor-online.net

On Tue, 13 Sep 2011 11:39:16 +0200, Georg Bauhaus wrote:

> On 13.09.11 10:30, Simon Wright wrote:
> 
>> My prompt for asking this was a colleague who was used to Erlang and was
>> complaining that GNAT's use of OS threads meant he would have to change
>> his design mindset to not use thousands of tasks (Erlang processes).
> 
> Just an idea: using mostly functions together with protected
> channel objects should allow to use Ada in a way one
> might be used to when passing Erlang data around.

Unfortunately this does not work this way for many reasons (I have
evaluated this design for our middleware and quickly dropped the idea). 

Protected objects are not tagged, you need inheritance to provide typed
channels. You meed multiple dispatch to handle channel-type + value-type
hierarchies. You need entries returning indefinite values. You need MI to
have handles to the channels/devices implementing the interface of a
protected object.

>  You write to some entry/procedure of a PO (pass data down
> the channel) and read from some entry/function of the PO
> (read from a channel). Add barriers as needed.

Of course this can only be the transport layer. In our design at the
application layer the channels are multiplexed into typed named channels,
so that you can exchange data as if you had one channel per each variable
and in full duplex mode of course.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



  reply	other threads:[~2011-09-13 12:18 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-10 15:19 Does GNAT support a thread-free RTS? Simon Wright
2011-09-11  8:20 ` J-P. Rosen
2011-09-11  9:22   ` John B. Matthews
2011-09-11  9:49     ` anon
2011-09-11 10:29       ` Pascal Obry
2011-09-12  0:33         ` anon
2011-09-12  7:27           ` Simon Wright
2011-09-12  9:26           ` Ludovic Brenta
2011-09-12  9:49             ` Ludovic Brenta
2011-09-13  1:22               ` anon
2011-09-12 13:01             ` Robert A Duff
2011-09-11 10:36   ` Simon Wright
2011-09-12  7:19   ` Ludovic Brenta
2011-09-12 23:22     ` Rugxulo
2011-09-13  7:03       ` Ludovic Brenta
2011-09-13  7:55         ` Ludovic Brenta
2011-09-13  8:30 ` Simon Wright
2011-09-13  9:39   ` Georg Bauhaus
2011-09-13 12:18     ` Dmitry A. Kazakov [this message]
2011-09-13 14:02       ` Robert A Duff
2011-09-13 16:35         ` Dmitry A. Kazakov
2011-09-13 16:54       ` Georg Bauhaus
2011-09-13 20:35         ` Dmitry A. Kazakov
2011-09-13 21:22           ` Georg Bauhaus
2011-09-14  7:58             ` Dmitry A. Kazakov
2011-09-13 10:57   ` Peter C. Chapin
replies disabled

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