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!.POSTED!not-for-mail From: Nick Roberts Newsgroups: comp.lang.ada Subject: Re: Why couldn't an operating system be written in ada Date: Sun, 7 Apr 2019 02:55:21 +0100 Organization: A noiseless patient Spider Message-ID: References: <4s8rud$9j3@tribune> <1ae2b744-f80b-4450-b8d3-7b49fca01f15@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Sun, 7 Apr 2019 01:55:20 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="a53370dd75bcd957027770d7a7d56ab1"; logging-data="22220"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/CwBpXYzQ7FC9P+yexjd/O" User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.0 Cancel-Lock: sha1:7wo+fO3lFccMZptnE73yrwQNUZk= In-Reply-To: <1ae2b744-f80b-4450-b8d3-7b49fca01f15@googlegroups.com> Content-Language: en-GB Xref: reader01.eternal-september.org comp.lang.ada:56092 Date: 2019-04-07T02:55:21+01:00 List-Id: On 10/01/2019 23:38, cenci.br@gmail.com wrote: > Em sábado, 13 de julho de 1996 04:00:00 UTC-3, Mark McKinney escreveu: >> It has been claimed that the capability to interface with other languages >> is a great asset to ada. Sometimes interfacing can be a tremendous >> liability. Besides the OS could perform most of work that the language >> runtime does. So why not build an OS in ADA? > > Is this discussion still active ? I have a little bit of a plan for this, but I must admit it is very ambitious. The biggest problem I face is getting help, as well as my own lack of skill in running these projects. My current plan goes along these lines: I am building a new Ada compiler that will use a new technology for targeting machine architectures. The following is a simplification, but it gives the gist of it. 1. The compiler builds Ada source text into an intermediary code, called 'PXC' (a kind of abbreviation for 'extended pseudo-code'). These PXC files are distributed to the target machines. Each PXC file is a module, and a complete program comprises many such modules (perhaps hundreds of them, or even thousands). 2. Each target machine itself has a program called the Realizor, which generates a real executable file, comprising actual machine code for the architecture of its own processor(s), from the complete set of PXC modules that go to make up the program. One of the big advantages of doing it this way is that global optimisations, including inlining of cross-module calls, can be performed by the Realizor. In addition, the Realizor can implement a strategy of capturing profiling data (execution statistics) for the program, and periodically re-realising it to yield still better optimisations. 3. Because of the way the Realizor works, all privilege level-changing calls (e.g. into the kernel) can be removed. Security is, nevertheless, fully maintained. (I also intend the technology to remove all use of hardware paging; this will be replaced by a more intelligent software-based segment-swapping mechanism.) 4. Because of 3 above, it is possible for the kernel and all the device drivers and other low-level software to be PXC modules, mixed in by the Realizor along with all the other PXC modules. This means that many kernel calls can be inlined, effectively eliminating all call overhead on them. I believe these technologies would enable a dedicated piece of software, running 24/7, to run significantly faster. When you consider how important performance is on today's vast farms of servers, that could be a pretty compelling reason for people to switch from traditional operating systems. All I have to do is to do it :-) I'm hoping it could be a way of getting Ada back into the mainstream. We all know in this forum that building future software in Ada, especially server software, would be a big step towards making it more secure and reliable. PS: There's a lot more about this scheme that I would like to say, but I don't want to turn this post into a dissertation, and I do want to get to bed soon. If you have any burning questions, please ask.