From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,115bda8caeda5fa4 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Received: by 10.68.13.100 with SMTP id g4mr384855pbc.25.1315871425694; Mon, 12 Sep 2011 16:50:25 -0700 (PDT) Path: m9ni4992pbd.0!nntp.google.com!news1.google.com!postnews.google.com!u19g2000vbm.googlegroups.com!not-for-mail From: Rugxulo Newsgroups: comp.lang.ada Subject: Re: Does GNAT support a thread-free RTS? Date: Mon, 12 Sep 2011 16:22:42 -0700 (PDT) Organization: http://groups.google.com Message-ID: <0c106a53-63e2-48f7-b337-5f54171e3e2b@u19g2000vbm.googlegroups.com> References: <55587e8d-93c1-4753-ae8c-250b31e9eb64@dq7g2000vbb.googlegroups.com> NNTP-Posting-Host: 65.13.115.246 Mime-Version: 1.0 X-Trace: posting.google.com 1315871425 4162 127.0.0.1 (12 Sep 2011 23:50:25 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 12 Sep 2011 23:50:25 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: u19g2000vbm.googlegroups.com; posting-host=65.13.115.246; posting-account=p5rsXQoAAAB8KPnVlgg9E_vlm2dvVhfO User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: HUALESNKRC X-HTTP-UserAgent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0.2) Gecko/20100101 Firefox/6.0.2,gzip(gfe) Xref: news1.google.com comp.lang.ada:17934 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Date: 2011-09-12T16:22:42-07:00 List-Id: Hi, On Sep 12, 2:19=A0am, Ludovic Brenta wrote: > J-P. Rosen wrote on comp.lang.ada: > > > Simon Wright a =E9crit : > >> 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 th= at > >> blocking on I/O would block the whole program, but for some purposes i= t > >> might be ideal. > > > No, it used the FSU threads > > The FSU threads library was a kind of green threads. =A0The 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.) 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. 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.)