Experimental OS development using D

Alexander Panek a.panek at brainsware.org
Tue Jan 2 08:33:26 PST 2007


Harry Vennik wrote:
> Hi,
> 
> At the beginning of this year I'd like to present a whole new idea that very much involves the D
> Programming Language. My idea is to start development of an experimental operating system, that
> should be constructed in an object-oriented way as much as possible, but no 'forcing of OOP at all
> cost'. Of course OS implementation involves a lot of low-level coding. The one and only suitable
> language to combine low-level coding and OOP appears to be D. (Don't argue it could be C++ too, that
> language is unusable because of it's immense complexity. I keep asing myself why so many people use
> it anyway...)
> 
> The OS should consist of a microkernel similar to L4, to be written in C (as much as possible) and
> Assembly (where necessary). And any number of services running on top of it, all to be written in D. It
> should be an OS that is inspired on UNIX, but not be a real UNIX implementation. Rather it should feel
> like an evolution of the UNIX-way of doing things.
> 
> I realize that the current performance of D might not be suitable for serious OS development, but I do
> not think of that as a real problem. I think that in the very first, highly experimental phase of
> development, the actual performance is not much of an issue. Later on, when it will become an issue,
> the D compiler will probably have been improved already to provide that optimization performance.
> 
> I chose the D Programming Language only for its bare language features, not anything else. It was
> simply the only language I could find that met my requirements. Any libraries or frameworks won't help
> in OS development anyway, because they are supposed to be used on top of an OS. Of course the
> interfaces of the OS should be optimized to make it as easy as possible to use it using the D standard
> library (be it Phobos, or Tango, or whatever will turn out to become some sort of standard). Also the
> development of the OS might influence the development of a D standard library at some points.
> 
> Is there anyone here who is interested in working with me to get that project going, and help by
> contributing in the development of a specification and/or in implementation of those (including PoC
> coding)?
> 
> Regards,
> 
> Harry Vennik

Hello Harry,

I'm doing a research project with pretty similar approaches, with just 
one difference: the kernel shall be totally in D and necessary parts in 
assembly (may it be inline assembly, or nasm/yasm/gas/whatever - just 
the right tool for each individual job). I have a very little code base 
already in a public Subversion repository, if you want to take a look. 
The base idea of this project was meant to be implemented in C, but I'm 
trying to push through a D version for the proof of the statement, that 
D is a system programming language - and it is, a great one even!

Unfortunately there's not too much information or documentation yet, as 
it's just a hobby project I'm doing with a friend of mine in our spare 
time (got too little of that lately :( ).

Anyways, here's the URL of the C code base we have so far implemented 
and running: http://trac.brainsware.org/ocb
The D version is just some testing code, a sketch if you want. I'm 
working on a better implementation of the basic things at the moment. 
Apart from that, I haven't got interrupts or exceptions to work yet - 
still some research to do there. http://trac.brainsware.org/ocd/

Great to see that I'm not the only one (together with the Titan folks, 
of course ;) ) who thinks that D would be the perfect language for OS 
development! :)

Best regards,
Alex

P.S.: What do you mean with "PoC coding"? Proof of Concept?



More information about the Digitalmars-d-announce mailing list