comp.lang.ada
 help / color / mirror / Atom feed
From: jsa@organon.com (Jon S Anthony)
Subject: Re: Why couldn't an operating system be written in ada
Date: 1996/07/16
Date: 1996-07-16T00:00:00+00:00	[thread overview]
Message-ID: <JSA.96Jul16143454@organon.com> (raw)
In-Reply-To: JSA.96Jul14205008@organon.com


In article <xe1687p1cha.fsf@maneki-neko.cygnus.com> Mark Eichin <eichin@cygnus.com> writes:

> > 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...)

/Jon

-- 
Jon Anthony
Organon Motives, Inc.
1 Williston Road, Suite 4
Belmont, MA 02178

617.484.3383
jsa@organon.com





  parent reply	other threads:[~1996-07-16  0:00 UTC|newest]

Thread overview: 65+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-07-13  0:00 Why couldn't an operating system be written in ada Mark McKinney
1996-07-15  0:00 ` David Wheeler
1996-07-15  0:00   ` Michael Levasseur
1996-07-25  0:00     ` Greg Harvey
1996-07-26  0:00       ` Kent Mitchell
1996-07-16  0:00   ` Poutanen Olavi
1996-07-15  0:00 ` Nasser Abbasi
1996-07-15  0:00   ` Robert Dewar
1996-07-17  0:00     ` Randy Greene
1996-07-17  0:00   ` Hannes Haug
1996-07-15  0:00 ` Jon S Anthony
1996-07-15  0:00   ` Mark Eichin
1996-07-15  0:00   ` Brian Rogoff
1996-07-16  0:00   ` Jon S Anthony [this message]
2019-03-02 16:07   ` Optikos
2019-03-03 22:14     ` russ lyttle
2019-01-10 23:38 ` cenci.br
2019-01-10 23:54   ` Lucretia
2019-04-07  1:55   ` Nick Roberts
2019-04-07  4:32     ` Optikos
2019-04-07 10:35       ` Nick Roberts
2019-04-07 14:06         ` Optikos
2019-01-14 11:26 ` George Shapovalov
2019-02-25  2:25   ` russ lyttle
2019-03-09 18:43     ` Norman Worth
2019-02-25 21:56 ` Rabican
2019-02-26  8:46   ` Niklas Holsti
2019-02-26  9:30     ` Dmitry A. Kazakov
2019-02-26 23:32       ` lyttlec
2019-02-27  2:00         ` Dennis Lee Bieber
2019-02-27  6:20           ` russ lyttle
2019-02-27  8:26             ` Dmitry A. Kazakov
2019-02-27 13:54               ` russ lyttle
2019-02-27 15:55                 ` Dmitry A. Kazakov
2019-02-27 16:46                   ` russ lyttle
2019-02-27 23:52                   ` Randy Brukardt
2019-02-27  8:20         ` Dmitry A. Kazakov
2019-02-27 14:06           ` russ lyttle
2019-02-27 14:23             ` Niklas Holsti
2019-02-27 16:01             ` Dmitry A. Kazakov
2019-02-27 17:04               ` russ lyttle
2019-02-27 17:29                 ` Dmitry A. Kazakov
2019-03-09 18:46         ` Norman Worth
2019-02-26 23:13     ` lyttlec
2019-02-27 19:10       ` Shark8
2019-02-27 19:51         ` russ lyttle
2019-02-27 22:12           ` Niklas Holsti
2019-03-01 15:07             ` fabien.chouteau
2019-02-27 10:47 ` Patrick Jakubowski
2019-02-28  6:23   ` G. B.
2019-02-28  8:28     ` Simon Wright
  -- strict thread matches above, loose matches on Subject: below --
1996-07-15  0:00 Robert C. Leif, Ph.D.
1996-07-17  0:00 ` Mark McKinney
1996-07-20  0:00   ` Michael Feldman
1996-07-22  0:00     ` Theodore E. Dennison
1996-07-22  0:00       ` Larry Kilgallen
1996-07-30  0:00       ` Pascal Martin @lone
1996-08-01  0:00         ` Bob Kitzberger
1996-08-03  0:00           ` Pascal Martin @lone
1996-07-17  0:00 ` wfranck
1996-07-17  0:00 ` wfranck
1996-07-22  0:00   ` Felicia R. Rosemond (214)-462-5371 ple1 SE
1996-07-29  0:00     ` Wallace E. Owen
1996-07-15  0:00 Simon Johnston
1996-07-19  0:00 Marin David Condic, 407.796.8997, M/S 731-93
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox