comp.lang.ada
 help / color / mirror / Atom feed
From: Rugxulo <rugxulo@gmail.com>
Subject: Re: Does GNAT support a thread-free RTS?
Date: Mon, 12 Sep 2011 16:22:42 -0700 (PDT)
Date: 2011-09-12T16:22:42-07:00	[thread overview]
Message-ID: <0c106a53-63e2-48f7-b337-5f54171e3e2b@u19g2000vbm.googlegroups.com> (raw)
In-Reply-To: 55587e8d-93c1-4753-ae8c-250b31e9eb64@dq7g2000vbb.googlegroups.com

Hi,

On Sep 12, 2:19 am, Ludovic Brenta <ludo...@ludovic-brenta.org> wrote:
> J-P. Rosen wrote on comp.lang.ada:
>
> > Simon Wright a écrit :
> >> It used to be that you could configure GNAT to use a tasking RTS that
> >> didn't use threads; tasks were scheduled entirely within the RTS. I
> >> think these may be called 'green threads'[1]. Of course, this meant that
> >> blocking on I/O would block the whole program, but for some purposes it
> >> might be ideal.
>
> > No, it used the FSU threads
>
> The FSU threads library was a kind of green threads.  The GNAT User's
> Guide of GCC 3.4 used to say: "The FSU threads package operates with
> all Ada tasks
> appearing to the system to be a single thread."

At the risk of showing my goofy bias and being offensively "obsolete"
or luddite here, let me mention:  FSU pthreads used to be included in
EZ2LOAD (old GNAT on Simtel.net circa 1998) using DJGPP (DOS).
However, AFAICT (only very limited testing, esp. since I don't grok
Ada yet), modern GNAT 4.6.1 [2011] for DJGPP doesn't support tasking,
not even with FSU pthreads (not included). This may be because it
(lib) wasn't maintained since year 2000 (and supposedly vaguely
conflicted with DJGPP libc newer than 2.00 [circa 1996]).

Recently some minor patching was done by one guy to compile p7zip 9.13
with DJGPP (again), this time using (fixed) FSU pthreads instead of
(vaguely buggy, slower, more complex, abandoned) GNU pth + Watt-32
(socket lib, required by GNU pth).

Yes, green threads are good if you want to support a lot of non-
mainstream OSes. But even projects like Ruby 1.9.x have abandoned such
ideas. This is why Ruby no longer supports as many platforms as in the
1.8.7 days (e.g. DOS and others). (What about Java 1.1? Wasn't that
green threads? There was an old commercial DOS port of JavaPC in 1997
via DJGPP. Yes, confirmed at Wikipedia.)

<off-topic rant>
It's not just tasking / threading, of course, it's also that such
systems are rarer or harder to maintain or just less popular. Also the
lack of nowadays "crucial" things such as Unicode support or newer GNU
tools probably doesn't help either. I'm not really complaining, just
sad that "portable" things have to be so expensive that only a very
few (usually the big three) mainstream OSes can support anything these
days.
</off-topic rant>

I guess? I should mention that typically popular, vanilla "DOS" (MS-
DOS and clones, e.g. FreeDOS) doesn't support threads at all. There
are several DOS-compatible systems (PC-MOS? TSX-32? Real/32? DR-DOS 7?
RDOS?) that do support 'em, but most people (myself included) haven't
extensively (or even never) used them. Just in case someone whines
that it doesn't exist, heh.  ;-)

P.S. I expect no sympathy for DOS, and thus I almost hate to even
bring it up here! But hey, perhaps it sheds some light. (Corrections
or additions welcome.)



  reply	other threads:[~2011-09-12 23:50 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 [this message]
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
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