"Building a "real" OS is a very large job, it takes years and years,
with large teams of people working on it, and very few companies
can committ to something like this very easily regardless of the
language used."
Building a full OS, including all utilities, compilers, etc is indeed
a very large job, but building just the kernel is not such a big job
(Linux for instance is NOT that large). So building an OS kernel
in Ada would be a reasonably practical project.
> liability. Besides the OS could perform most of work that the language
> runtime does. So why not build an OS in ADA?
A neat idea whose time is long since gone. The OS "wars" have been fought
and largely lost.... :-(
/Jon
--
Jon Anthony
Organon Motives, Inc.
1 Williston Road, Suite 4
Belmont, MA 02178
The BiiN system had an OS written in Ada, as well as a number of
other interesting capabilities (fault-tolerance, capability-based
security, etc.). However, developing the OS, hardware, and other things
was incredibly costly, and the sales didn't ramp up fast enough
to overcome the $$ invested.
Real OS's are time-consuming to create.
--- David A. Wheeler
Net address: whe...@ida.org
> A neat idea whose time is long since gone. The OS "wars" have been fought
> and largely lost.... :-(
Well, the users lost anyway :-} However, research certainly
continues -- and there need to be good arguments against doing OS
research using fragile, difficult to read languages like C...
MK, VSTA, and other operating systems exist to serve as research
platforms (and sometimes as operational platforms when "modern" 70's
and 80's systems just can't cut it.) Surely there is justification
for using Ada in this context, at least?
I brought up this point with a well known linux kernel developer, and
between the two of us we came up with several things that I didn't
know Ada95 well enough to answer:
1) Can you do efficient raw memory operations (ie. raw byte
arrays, explicit control of when an access can be eliminated, and no
overhead [or at least, not stored in-place, for an object like a page
or a video card?]
2) Can you interface efficiently to machine code
(ie. equivalent of inline asm, where you *mostly* can code a high
level algorithm but the core needs to be a particular hardware level
instruction. A GNAT-specific answer is ok, in this case...)
3) Can you work without tasking (since you're implementing the
scheduler!) [I'll take arguments that you should in fact use Ada
tasking within the kernel, if they're detailed...]
4) Can you do complete memory management (without garbage
collection.)
As you can see, I *don't* know much Ada, though I've gotten a start on
Barnes' excellent "Ada95" text. My guesses are that (1) is possible,
but you must go out of your way to do it; (2) might be possible in
GNAT; (3) is probably obvious and (4) is true but the reasoning is
subtle.
I haven't thought of any other potential obstacles to OS work in Ada;
it would seem a good choice, based on the *intent* of the design, but
I can't yet judge the results.
_Mark_ <eic...@cygnus.com>
Cygnus Support, Eastern USA
>From: Mark McKinney <mck...@mail.concentric.net>
Mark McKinney> > 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?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Nasser Abbasi >The question should be: why build another OS ? we already have
>too many.
----------------------------------------------------------------------------
-------------------------
The question, "So why not build an OS in ADA"? requires more than a yes or
no response.
Firstly, one should define, what constitutes an operating system. Then, one
should determine what parts will be improved by recreating and redesigning
them in Ada.
Since Windows is the best selling operating system, I will take the liberty
of offending some of you by defining an operating system as what one
purchases when buying Windows. This is NOT meant as an endorsement of
Microsoft's code.
Component Should be Ada Comment
--------------- ---------------------
Executive (core). Yes
GUI Needs a binding.
Device Drivers Use off the shelf. If not available, create in Ada.
Applets Use what is provided.
File System Use what is provided, and if necessary, add
Ada enhancements.
Ada POSIX Binding Would help.
Executive: I suspect that for both real-time systems and pseudo embedded
systems where the operating system only runs one application. These include
medical instruments and other dedicated devices.
GUI: I would prefer a thick binding for my applications. The use of some
standard to permit portability will greatly help. My present guess is that
HTML will be the successful portable solution.
Device Drivers: A major real advantage of Windows is the availability of
device drivers. Parenthetically, the major disadvantage of Ada is the lack
of device drivers for boards, such as analog to digital converters,
printers, and high resolution displays.
The only applets from Windows, where Ada would obviously help are those to
do with communication. Applets such as games, screen savers, and file viewers
The Windows 95 Explorer is a great improvement. However, a database based
system would be a further improvement.
Ada POSIX bindings would increase portability. I quite well understand that
it is probably too costly to provide a complete POSIX binding. However,
where possible, the Ada POSIX binding syntax should be employed. The
exceptions: Can_Not_Be_Implemented or Not_Implemented probably will need to
be created and used fairly often.
Lastly, I wish to emphasize that the present GUIs are often far beyond the
capabilities of most users. Many individuals, including some of considerable
ability in other fields, are still quite happy with DOS applications, such
as WordPerfect. A 32 bit version of DOS might still be a profitable enterprise.
Robert C. Leif, Ph.D.
Robert C. Leif, Ph.D., PMIAC,
Vice President & Research Director
Ada_Med, A Division of Newport Instruments
Tel. & Fax (619) 582-0437
> liability. Besides the OS could perform most of work that the language
> runtime does. So why not build an OS in ADA?
A neat idea whose time is long since gone. The OS "wars" have been fought
and largely lost.... :-(
I disagree. The PC desktop war looks over to me (Win 95 / Win NT) but there
are lots of other markets open and opening. And a pure research OS, or a
freeware OS like Linux, is always a neat idea to me :-). In fact I bet there
are quite a few OO-OSs written in C++ that could have been written in
Ada 95.
-- Brian
From: Mark McKinney <mck...@mail.concentric.net>
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?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The question should be: why build another OS ? we allready have
too many.
bye the way, I saw a book many years ago, where some people
did develop some sort of operating system in Ada83, offcourse
it was a research type OS system, not a "real" commercial
one, do not know now the name of the book, but it was around
1988 or so.
Building a "real" OS is a very large job, it takes years and years,
with large teams of people working on it, and very few companies
can committ to something like this very easily regardless of the
language used.
Nasser
--
Nasser Abbasi. C/C++/Ada Solaris. GeneAssist - A client/server application
for Nucleic acid and protein sequence search and analysis.
Perkin Elmer - Applied BioSystem division. email: nas...@apldbio.com
MSEE(control), MSCS, MSCE, FM (Fide Chess Master).
> > A neat idea whose time is long since gone. The OS "wars" have
> > been fought and largely lost.... :-(
>
> Well, the users lost anyway :-} However, research certainly
Yeah, that's what I meant...
> MK, VSTA, and other operating systems exist to serve as research
> platforms (and sometimes as operational platforms when "modern" 70's
> and 80's systems just can't cut it.) Surely there is justification
> for using Ada in this context, at least?
I'm sure there is all sorts of good reasons to use Ada in these
contexts. But, the results will probably never see the light of day -
maybe a peek or two...
> I brought up this point with a well known linux kernel developer, and
> between the two of us we came up with several things that I didn't
> know Ada95 well enough to answer:
> 1) Can you do efficient raw memory operations (ie. raw byte
> arrays, explicit control of when an access can be eliminated, and no
> overhead [or at least, not stored in-place, for an object like a page
> or a video card?]
Yes, this should not be any sort of a problem. With
System.Storage_Elements and address clauses and such you should be
well covered.
> 2) Can you interface efficiently to machine code
> (ie. equivalent of inline asm, where you *mostly* can code a high
> level algorithm but the core needs to be a particular hardware level
> instruction. A GNAT-specific answer is ok, in this case...)
Sure. Actually this sort of thing is defined in the language with
convention intrinsic (6.3.1) and System.Machine_Code (13.8).
> 3) Can you work without tasking (since you're implementing the
> scheduler!) [I'll take arguments that you should in fact use Ada
> tasking within the kernel, if they're detailed...]
Sure you can. But to my mind, it would make as much (or more) sense
to first create the tasking kernel and then build the OS scheduler on
top of this. This seems like the most straightforward way to proceed
and it has the added benefit that you can use "regular tasking" in
other parts of the OS design and know that you will not be interfering
in some nefarious way with the OS scheduler. I'm sure there is
probably a reason why you might not want to do this, but it isn't
obvious to me.
> 4) Can you do complete memory management (without garbage
> collection.)
Sure. You can define your own storage pools (System.Storage_Pools)
and write specific MM operations for them. This way you can have
different styles of AMM for different sorts of "objects" - thereby
allowing the most "appropriate" technique for the resource type. See
13.11
> As you can see, I *don't* know much Ada, though I've gotten a start on
> Barnes' excellent "Ada95" text.
Yes, for knowledgeable types, outside the RM and Rationale, I would
say Barnes is the best thing going.
> My guesses are that (1) is possible,
> but you must go out of your way to do it; (2) might be possible in
> GNAT; (3) is probably obvious and (4) is true but the reasoning is
> subtle.
(1): Really rather straight forward and not that big of a deal
(2): Easily done.
(3): Yes, obvious
(4): Really pretty obvious also. The subtlty comes in how clever the
AMMs you write are.
> I haven't thought of any other potential obstacles to OS work in Ada;
> it would seem a good choice, based on the *intent* of the design, but
> I can't yet judge the results.
Well, one way to look at it is that since (one of) the primary areas
of intended use for Ada was and is "real-time"/embedded systems, OS
sort of work should "just fall right out". Access to HW, interrupts,
and that sort of bare machine stuff is defined in the language (well,
the annexes anyway...)
The Nokia MPS 10 machine was all built around Ada. Its OS and all other
subsystems were written in Ada. The hardware architecture was prorietary,
"home designed". The instruction set and Ada run-time system were to some
extent desingned hand-by-hand putting the implementation to that side where
it was most convenient/efficient.
This effort took place in Finland at Nokia Data System roughly around the
years 1979..1987. This machine was supposed to become a winner, to contain
the most advanced techniques and ideas. At the early 80's Ada was one of
those. I personally was involved in the MPS 10 effort primariliy as being
in charge of the RDBMS system implemented in Ada (see Proceedings of the
Ada Europe 1985, Paris) and of some Ada testing tools (Ada Europe 1987,
Stockholm and Quality Week 1993, San Francisco).
Nokia Data, today known as ICL Data (Nokia Corp sold its computer
manufacturing branch to ICL Plc/UK sometimes 1990), had been a leading
provider of bank systems (3-tier architechture) to Finnish banks. The
previous solution was based (branch office computers) on also Nokia-
proprietary Mikko-3 computers.
I remember one special argumentation in favor of Ada in that business
situtation: It was envisioned (at early 80's) that the future is in open
architectures and standard hardware solutions. Perhaps the banks won't buy
a yet another system upgrade where they should again build all their
applications from scratch. Ada and its portability was supposed to help
here, as a means to carry the applications to the new platform.
The next platform came soon: Intel 80286/386(/486) and OS/2. We bravely
tried to get an Ada environment into OS/2. But due to various reasons Ada
really didn't take off on that environment at Nokia.
Anyways, the MPS 10 machine has been in use in a couple of Finnish banks
for many years (as a branch office server having certain responsibility of
the overall system). It was not many years ago when I still saw those
machines, don't know if there are any more in production use.
Once the bugs and inefficiencies of the MPS 10 systems were ironed away and
the usage got stabilized, it was amazing with how little maintenance staff
the support could be managed.
On peak years the development staff was c. 200 people. Today they are still
either at ICL doing the Team OFFICE product or at Nokia Corp doing
telecommunications or mobile phones software.
Just my 2 Eurocents...
- Olavi
-------------------- *** Code hard, test well! *** ------------------------
Olavi Poutanen E-mail: ola...@cs.tut.fi
Testwell Oy Tel: +358-31-316-5464
Kanslerinkatu 8, FIN-33720 Tampere, Finland Fax: +358-31-318-3311
(After 12 Oct 1996 00:00 use Tel: +358-3-316-5464, Fax: +358-3-318-3311)
---------------------------------------------------------------------------
Robert> Nasser said
Robert> "Building a "real" OS is a very large job, it takes years and
Robert> years, with large teams of people working on it, and very few
Robert> companies can committ to something like this very easily regardless
Robert> of the language used."
Robert> Building a full OS, including all utilities, compilers, etc is
Robert> indeed a very large job, but building just the kernel is not such
Robert> a big job (Linux for instance is NOT that large). So building an
Robert> OS kernel in Ada would be a reasonably practical project.
Perhaps the just released Flux Operating System Toolkit
(http://www.cs.utah.edu/projects/flux/oskit/html/) can be used.
A hello word kernel is probably a weekend project. But I might
be wrong.
-hannes
My 2 cents...
I agree with Robert that the effort to build an OS kernel in Ada is
not unreasonably large. The part of Hughes Aircraft that I work for
has been writing real-time embedded OSs in Ada since 1988, the latest
having been developed for the F-22 figher. These OSs support multiple
programs, multi-threaded processes, separate virtual address spaces
for each program, Multi-level security, etc., and, even with all the
I/O drivers, these OSs have tended to run around 25,000 lines of code
or smaller (maybe 15,000 for the kernel itself). This isn't so large
that its beyond the scope of one person to write. My experience is
that the other tools needed for a "full" system (compiler, linker,
debugger, etc.) tend to take far more effort than the kernel itself.
Randy Greene
Hughes Aircraft Company
Radar and Communications Systems
Just my 2c worth.
MDC
Marin David Condic, Senior Computer Engineer ATT: 407.796.8997
M/S 731-96 Technet: 796.8997
Pratt & Whitney, GESP Fax: 407.796.4669
P.O. Box 109600 Internet: COND...@PWFL.COM
West Palm Beach, FL 33410-9600 Internet: CON...@FLINET.COM
===============================================================================
"I'm just glad it'll be Clark Gable who's falling on his face and
not Gary Cooper."
-- Gary Cooper on his decision not to take the leading role in
"Gone With The Wind."
===============================================================================
If it's an academic project that you'd be doing for curiosity, I say
"go for it." Depending on how much you know already about OS functionality,
you could start by studying the source code for Minix, or even Linux
for that matter, then designing your Ada OS.
I agree with the other writers that there is little or no commercial
reason for an Ada clone of an existing, supported, OS. Why reinvent
the wheel? Why fix what isn't broken?
There is surely no reason why an OS can't be done in Ada, all the way
down to the metal.
Mike Feldman
Well...it would plug up quite a few of UNIX's security holes.
--
T.E.D.
| Work - mailto:denn...@escmail.orl.mmc.com |
| Home - mailto:denn...@iag.net |
| URL - http://www.iag.net/~dennison |
But then it might not be Unix.
What some of us security advocates see as "holes", long-term Unix
advocates see as "features".
At some point one has changed the operating characteristics of an
environment so much that it is no longer the same operating system.
I think with Unix that time might come sooner rather than later.
Larry Kilgallen
The story is better than this, of course. Rational offered an odd-looking
terminal that was longer in the vertical direction than in the horizontal.
The display system would then divide this pure-text terminal into separate
windows. Each window could then be used to display various kinds of
interesting information such as "file system" structure, code that you were
editing, and various kinds of status.
All of the navigation of this system (which was written BY programmers FOR
programmers) was done with the 300+ keys. To accomplish 300+ keys, of
course, you have to have key modifiers such as ctrl, meta, hyper, etc. I
don't recall the names of the keys on the terminals RATIONAL sold, but I do
remember having one of the programmers on my team working the problem of
connecting the Rational to different platforms via telnet-style
connections.
Don Silvasi-Patchin did the work, and it was a beautiful work of art.
Since we were doing this for NASA (Software Support Environment for Space
Station Freedom), we of course were expected to produce remarkably similar
keymaps for all supported platforms which included VT100-compatible
terminals, PC's, Mac, and Apollo (don't ask how those became the
standards...that is a separate post).
Don spent about 3 months massaging the Delta environment until it would in
most cases properly recognize which terminal emulator was hitting it and
respond in a reasonable fashion. He also spent a lot of time figuring out
how he could do he could do the keymaps so that a person who was familiar
with them on one computer would have a shallow learning curve if they had
to work with them on another computer. The result was then written up and
put onto oversized "pocket cards" which prominently displayed the SSE logo.
It really was a NICE solution to a tricky problem.
The result? SSE didn't really use the Rationals much for programming
because the cross-machine targeting issues were trickier than originally
imagined. Because Rational had a product that helped with 2167A
documentation, the sites that had Rationals tried to use them to produce
the volumes and volumes of SSF design documents. This of course was not
what the Rational was designed to do, so it took up all available machine
resources.
This of course prevented what little programming that WAS done on the
Rational from getting done in any reasonable time frame, which pushed
people onto Unix and PC boxes for development and compiling. Rational
caused the demise of their own machine by supporting documentation on it.
Getting back to the keymaps, the funny thing was, since only the main SSE
project had much of a mixture of machines, in spite of spending 3 months of
programmer effort on building a standard keymap, the work package
contractors tended to rely on the original, Rational keymap for VT100
because: a) they had learned it first, and b) it was "good enough".
: This of course prevented what little programming that WAS done on the
: Rational from getting done in any reasonable time frame, which pushed
: people onto Unix and PC boxes for development and compiling. Rational
: caused the demise of their own machine by supporting documentation on it.
Well ... this is not exactly true. While the SSE document generation didi
drag a whole machine, they were far and away some of the most complicated
documents I've ever seen (and worthless for any real purpose other than
satisfying a contractual obligation). Most of our customers were quite
successfull using our documentation generation capabilites. It's not
what "caused the demise of (our) machine".
The machines went away because Rational could not afford to keep up with
the IBM, Sun and Intel's of the world on hardware performance. That
coupled with the demand for open systems was too great for a
custom hardware/software solution to fly. I think our Apex solution is
superior to our old systems *and* on standard hardware/os.
--
Kent Mitchell | One possible reason that things aren't
Technical Consultant | going according to plan is .....
Rational Software Corporation | that there never *was* a plan!
I see your point.
// Wally
Let be a little technical here, and come back to the original point.
Alsys, then Thomson Software Products, have almost always implemented the
Ada runtime for bare targets in (a subset of) Ada. This is what I know as
the closest approximation of an OS.
The Ada standard assumes the following ressources as granted: tasking, heap,
exceptions, io (too name a few).
One of the purpose of the OS is to provide tasking, so breaking the "egg and
chicken" problem imply prohibiting use of the tasking within the OS kernel
code. Not a big problem by itself, but a new set of tasking primitives will
have to be defined for kernel internal use. A good point could be using
a (very) simplified implementation of protected records.
The Ada heap is a nice but complicated piece of code. It could be reused for
an OS, except that it does not comply with MMU or DMA requirements. A lower
memory management level is to be implemented (and the Ada heap should be
rebuilt on top of it). The Ada heap is also protected against concurrency.
This is nice to have, but depends on the Ada tasking internals. Some
adaptations would be required.
One problem is the Ada type system. An OS constantly switch from one level
of abstraction to another: for example, it reads a disk block, and then
understands it as a directory content. With its strong type system, Ada is
not comfortable at that (any comment ??). With its weak type system, C let
the user do all the mistakes he never wanted to do. An usual solution is
to make extensive use of System.Address: programming in Ada with a C style.
Not only it is as unsafe as C, but Ada make things a little more ugly than C.
The best work-around I have ever found is using array-of-bytes buffers and
then use the address clause to map a more typed view. Looks too much like C.
Beware of aliasing and alignment problems !
What we need in an OS would be a language with some controled 'type morphing'
features. Modula 2 included some basic morphing (with its predefined 'generic'
types: BYTE, WORD, ..). A good academic subject ?
Exceptions are good for many things. I would promote use of exceptions in
an OS. But the Ada 95 exceptions raise multiple concerns when STORAGE_ERROR
is raised, because the exception occurence stuff may require use of dynamic
structures. This is a huge problem in an OS which must survive to memory
ressources limitations. So I would recommend using only a subset of the
exceptions features.
If you look back at these restrictions, you will find out that most of them
imply using a specific, reduced, implementation of the runtime. But each
compiler comes with its own (specific) runtime, and runtime interfaces.
Any solution will be compiler-specific and involve building your own 'Ada'
environment (runtime) first. This is not really Ada anymore. This environment
will be the lower layer of the OS kernel. The rest of the OS (drivers, file
systems, network, ..) could be built on top of it.
In France the SOL project intended to build a Unix clone in Pascal (ISO
version). The founding came from the French ministry of defense, because
of export restriction on US products. Eventually, SOL came to life, but
they was forced to define their own variant of Pascal (and managed to get
it adopted as an AFNOR standard--the French equivalent of ANSI), so they
could still claim using a 'standard' Pascal. SOL was not really better
than Unix version 7, and could not keep on competing with BSD. This is
a dead thing now. A lesson to learn ?
The final lesson is Ada has never been designed for such a purpose, obviously.
This has probably never been part of the DOD requirements, anyway.
Pascal Martin.
: One of the purpose of the OS is to provide tasking, so breaking the "egg and
: chicken" problem imply prohibiting use of the tasking within the OS kernel
: code. Not a big problem by itself, but a new set of tasking primitives will
: have to be defined for kernel internal use.
Once you bootstrap the tasking kernel though, you can rewrite the
tasking support using itself, though.
:-) :-) :-)
(a little Ada compiler/kernel implementation humor... _very_ little!)
--
Bob Kitzberger Rational Software Corporation r...@rational.com
http://www.rational.com http://www.rational.com/pst/products/testmate.html
In article <4tr8op$f...@rational.rational.com>, rlk@pelton (Bob Kitzberger) writes:
>Pascal Martin @lone (pma...@alsys.com) wrote:
>
>: One of the purpose of the OS is to provide tasking, so breaking the "egg and
>: chicken" problem imply prohibiting use of the tasking within the OS kernel
>: code. Not a big problem by itself, but a new set of tasking primitives will
>: have to be defined for kernel internal use.
>
>Once you bootstrap the tasking kernel though, you can rewrite the
>tasking support using itself, though.
>
>:-) :-) :-)
>
You have programmed in Lisp most of your life, don't you ? :-) I cannot wait
for seeing a rational product implementing this Meta-Tasking concept !.
Pascal.