comp.lang.ada
 help / color / mirror / Atom feed
* Stanford's Pintos Course
@ 2015-11-19  1:22 Nick Gordon
  2015-11-19  2:18 ` Paul Rubin
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Nick Gordon @ 2015-11-19  1:22 UTC (permalink / raw)


So I don't attend Stanford, and as a result as part of my undergraduate
degree I haven't taken their operating systems course, which, I consider
quite wonderfully, presents the students with a minimal kernel and simple
threading support, etc. The course for the students is to improve these
features, and implement virtual memory. The course has students doing this
in C (naturally), but I'm wondering if a system like this could be used to
test one's skills in OS development for any given language, so long as it 
can interface with the kernel (which is probably to say, interface with C).

I haven't looked through it terribly thoroughly, but I'd like to know if any
of the venerable here have experience with this system, or can recommend
any other "frameworks" for developing OS-level code in Ada.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Stanford's Pintos Course
  2015-11-19  1:22 Stanford's Pintos Course Nick Gordon
@ 2015-11-19  2:18 ` Paul Rubin
  2015-11-19  8:38   ` Hadrien Grasland
  2015-11-19 13:22 ` Lucretia
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 7+ messages in thread
From: Paul Rubin @ 2015-11-19  2:18 UTC (permalink / raw)


Nick Gordon <nicholas.gordon@operamail.com> writes:
> I haven't looked through it terribly thoroughly, but I'd like to know if any
> of the venerable here have experience with this system, or can recommend
> any other "frameworks" for developing OS-level code in Ada.

I don't know that course you describe, but the basic features you
mentioned are pretty standard in OS's, and you could read an OS book and
implement in Ada (with some intrinsics for raw memory access etc).
Tanenbaum's old book about OS's and Minix is pretty readable, describing
a simple message passing OS written in C.  You could do something
similar in Ada.  Of course I'm sure there's newer books now as well.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Stanford's Pintos Course
  2015-11-19  2:18 ` Paul Rubin
@ 2015-11-19  8:38   ` Hadrien Grasland
  0 siblings, 0 replies; 7+ messages in thread
From: Hadrien Grasland @ 2015-11-19  8:38 UTC (permalink / raw)


Le jeudi 19 novembre 2015 03:18:38 UTC+1, Paul Rubin a écrit :
> > I haven't looked through it terribly thoroughly, but I'd like to know if any
> > of the venerable here have experience with this system, or can recommend
> > any other "frameworks" for developing OS-level code in Ada.
> 
> I don't know that course you describe, but the basic features you
> mentioned are pretty standard in OS's, and you could read an OS book and
> implement in Ada (with some intrinsics for raw memory access etc).
> Tanenbaum's old book about OS's and Minix is pretty readable, describing
> a simple message passing OS written in C.  You could do something
> similar in Ada.  Of course I'm sure there's newer books now as well.

Also from Tanenbaum, I would strongly recommend "Modern Operating Systems". It's the single most useful book I've ever read on the theory and architecture behind operating systems.

Couple that with a general reference book on hardware architecture, and more detailed reference materials on the specific hardware you're targeting (e.g. wiki.osdev.org is a pretty good start for anything x86), and you should be all set.

The most tricky part will be, in my experience, to learn how to make your favorite programming language implementation produce suitable binaries, with a specific memory layout and without any dependence on underlying runtime services. This is usually the part of compilers and linkers that is most poorly documented, because it is not used very often. Thankfully, if you're using a reasonably popular language, someone has already done that and documented the process somewhere on the Web. See, for example, the "bare bones" tutorials of the OSdev wiki.

Once you've gone through that tricky part, it's really programming as usual, except that you have to write all the runtime services you need yourself. Quite an enlightening experience!


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Stanford's Pintos Course
  2015-11-19  1:22 Stanford's Pintos Course Nick Gordon
  2015-11-19  2:18 ` Paul Rubin
@ 2015-11-19 13:22 ` Lucretia
  2015-11-19 16:41   ` Luke A. Guest
  2015-11-19 13:23 ` Lucretia
  2015-11-19 18:23 ` johnscpg
  3 siblings, 1 reply; 7+ messages in thread
From: Lucretia @ 2015-11-19 13:22 UTC (permalink / raw)


On Thursday, 19 November 2015 01:22:50 UTC, Nick Gordon  wrote:
> So I don't attend Stanford, and as a result as part of my undergraduate
> degree I haven't taken their operating systems course, which, I consider
> quite wonderfully, presents the students with a minimal kernel and simple
> threading support, etc. The course for the students is to improve these
> features, and implement virtual memory. The course has students doing this
> in C (naturally), but I'm wondering if a system like this could be used to
> test one's skills in OS development for any given language, so long as it 
> can interface with the kernel (which is probably to say, interface with C).
> 
> I haven't looked through it terribly thoroughly, but I'd like to know if any
> of the venerable here have experience with this system, or can recommend
> any other "frameworks" for developing OS-level code in Ada.

I don't have experience doing it, but I have built the relevent compilers and zero-overhead runtime required to do it before.

This is all you need. I assume you will be targetting ia32? If so, you can use the system GNAT and use the --RTS flag to point to your new runtime. You'll also need a linker script but that's trivial.

See my tutorial here http://wiki.osdev.org/Ada_Bare_bones for more info.

Luke.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Stanford's Pintos Course
  2015-11-19  1:22 Stanford's Pintos Course Nick Gordon
  2015-11-19  2:18 ` Paul Rubin
  2015-11-19 13:22 ` Lucretia
@ 2015-11-19 13:23 ` Lucretia
  2015-11-19 18:23 ` johnscpg
  3 siblings, 0 replies; 7+ messages in thread
From: Lucretia @ 2015-11-19 13:23 UTC (permalink / raw)


Also, why use PintOS? Why not design your own and get them to use Ada with that? You can use the bare bones I already posted as a basis for this OS.

Luke.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Stanford's Pintos Course
  2015-11-19 13:22 ` Lucretia
@ 2015-11-19 16:41   ` Luke A. Guest
  0 siblings, 0 replies; 7+ messages in thread
From: Luke A. Guest @ 2015-11-19 16:41 UTC (permalink / raw)


Lucretia <laguest9000@googlemail.com> wrote:

> I don't have experience doing it, but I have built the relevent compilers
> and zero-overhead runtime required to do it before.
> 
> This is all you need. I assume you will be targetting ia32? If so, you
> can use the system GNAT and use the --RTS flag to point to your new
> runtime. You'll also need a linker script but that's trivial.
> 
> See my tutorial here http://wiki.osdev.org/Ada_Bare_bones for more info.

I have added a link today to the patch I created for my free-Ada project to
get gnat to build for arch-elf targets.

I'll need to update the bare bones tutorial at some point to make sure it's
all still valid, should be.

Luke



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Stanford's Pintos Course
  2015-11-19  1:22 Stanford's Pintos Course Nick Gordon
                   ` (2 preceding siblings ...)
  2015-11-19 13:23 ` Lucretia
@ 2015-11-19 18:23 ` johnscpg
  3 siblings, 0 replies; 7+ messages in thread
From: johnscpg @ 2015-11-19 18:23 UTC (permalink / raw)


On Thursday, November 19, 2015 at 1:22:50 AM UTC, Nick Gordon wrote:
> 
> I haven't looked through it terribly thoroughly, but I'd like to know if any
> of the venerable here have experience with this system, or can recommend
> any other "frameworks" for developing OS-level code in Ada.

Take a look at Xavier Grave's Lovelace kernel:

http://sourceforge.net/p/lovelaceos/code/ci/lovelace-dev/tree/phase_II/src/kernel/

If I remember correctly it's based on a well-documented C Unix-like (minimal) OS, but may take a bit of work to dredge up the docs.


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-11-19 18:23 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-19  1:22 Stanford's Pintos Course Nick Gordon
2015-11-19  2:18 ` Paul Rubin
2015-11-19  8:38   ` Hadrien Grasland
2015-11-19 13:22 ` Lucretia
2015-11-19 16:41   ` Luke A. Guest
2015-11-19 13:23 ` Lucretia
2015-11-19 18:23 ` johnscpg

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