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=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!i2pn.org!weretis.net!feeder6.news.weretis.net!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!buffer1.nntp.dca1.giganews.com!news.giganews.com.POSTED!not-for-mail NNTP-Posting-Date: Sat, 09 Mar 2019 12:43:20 -0600 Subject: Re: Why couldn't an operating system be written in ada Newsgroups: comp.lang.ada References: <4s8rud$9j3@tribune> <6ee2838d-4b6a-4b8e-9583-fc1ce4f3a1bd@googlegroups.com> From: Norman Worth Date: Sat, 9 Mar 2019 11:43:17 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0 SeaMonkey/2.49.4 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Message-ID: X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-TmxQ2SJUOArVPAjGILMEYEa/1FNi81i4NDLbo/dZoKY6nDaD0B8IpCPDg7/n+43Iw7FszIWEBHS75a4!414xYSAkI6prRkGglaSsCZ9p/raqlHDLwGkiR1PVxW30yGbeGynEpYtpp8MQap2Djme/GO2QIX2u X-Complaints-To: abuse@giganews.com X-DMCA-Notifications: http://www.giganews.com/info/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 3946 Xref: reader01.eternal-september.org comp.lang.ada:55821 Date: 2019-03-09T11:43:17-07:00 List-Id: russ lyttle wrote: > On 1/14/19 6:26 AM, George Shapovalov wrote: >> Well, gnat is built on top of gcc, so you have implicit Ada >> integration with the gcc toolchain and even Posix bindings to assist >> is some tasks. So, strictly speaking, nothing stops someone from >> starting to replace Linux/BSD kernel internals one module at a time :) >> (you would have, of course, to operate within the no-RTL limitation). >> Having maintained gnat in Gentoo Linux I can attest to feasibility of >> at least small tweaks and general compatibility.. >> Of course you would have to prove the merit of such replacement to the >> larger community, presenting extra stability/maintainability or >> utility sufficient to overcome the resistance to the unknown new thing. >> >> Also, @Pascal Martin mentions some very nice points about tasking and >> heap management. Unix has a different tasking model, so direct >> substitution is not an option, but I suppose a superset and bindings >> could be provided. This and all others are, however, tedious and time >> consuming tasks. Especially the community handling aspect. But at >> least this way you have some "point of entry". Creating a complete new >> and not tied to established standards OS may be possible (even if >> resource hungry). But making people actually use it (to any >> significant extent, rather than playing with it for all of 1hr, even >> when provided for free) would be much more complicated.. >> > Actually, I once wrote a small operating system in ada'83. I was just > about to ask here if someone had done the same thing in a more modern > version. Think of an Ada version of uCOS. A generic cross-compiler or > IDE that accepts a profile of the target hardware might be needed. Operating systems have been written Ada; you just have never seen or heard of them because they have been small projects, either academic or for specialized uses. Not all operating systems are Posix complaint, or have user interfaces, or support multiple users. What constitutes an operating system may be an issue here. At its most basic, it is just a program that provides certain common utility functions. It is often often a good idea to write (or adapt from the many that are already out there) a bare bones operating system to handle IO and dispatching for embedded systems. (Ada tasking takes care of dispatching pretty well, but IO is another matter.) Somebody had a project to write a fully Posix compliant, BSD-like operating system a few years ago, but I don't know if it was ever finished. The Posix standard is very C oriented, so this might be a challenge.