[Mono-dev] [Mono-devel-list] Operating System in C# Project

Johann MacDonagh johann at macdonaghs.com
Mon Oct 30 14:51:33 EST 2006

Brian Crowell wrote:
> What interests me most about this is a C# program as a first-class
> citizen, or really, every API in the system being not only available, but
> *designed for* managed programs.

Right. I dislike how current mainstream operating systems regard executables
as "just another file". Also, a managed API into the actual kernel would
make managed application development much easier.

Brian Crowell wrote:
> I think a good example of that can be found in Microsoft's DirectX, which
> we were just discussing. Compare Managed DirectX to XNA. The differences
> are big. XNA exposes, for the most part, the very same APIs, but in a much
> more intuitive and friendly manner than Managed DirectX.

I agree. I always considered managed APIs to be easier to use versus a
non-managed API (such as a C library). Perhaps it was because of the extra
meta-data attached to an IL assembly, or perhaps it was because everything
*could* be organized much better (without global consts, etc...). Certainly
the same thing could be achieved with a managed operating system.

Brian Crowell wrote:
> You could consider fully object-oriented operating systems, where the
> design of the API is every bit as important as its concept. You could
> organize the system around safe plug-ins, each providing some service to
> the whole, such as a windowing system, file systems, etc., but which are
> most importantly *as easy to write as implementing an interface or an
> abstract base class.*

This was also an idea I had. Taking a page from ASP.net 2.0's new
"providers" mentality. The problem is that those usually require some level
of reflection to execute the correct assembly, which may or may not be easy
at such a low level.

Brian Crowell wrote:
> I'd be very interested in participating on design of such a thing. I've
> been trying to teach myself good object-oriented design over the years,
> and I think I would have some good input to give past the initial problem
> of booting such an environment.
> Perhaps the project could be approached in two stages? Half where we boot
> the managed environment, and half where we assume the managed environment.
> You could design and implement these independently of each other. You
> could even design a set of classes to emulate the kernel on top of an
> ordinary runtime, for the purposes of unit testing. One strategy I've
> become fond of, especially where components and unit testing come into
> play, is generous use of the IServiceProvider interface; if components
> accessed kernel objects this way (or a similar way, where you ask for a
> base class but not a specific implementation), they would neither need to
> know or care whether they're using the real thing or not.
> Several thoughts. Exciting stuff.
> --Brian
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list

I'm in the same state as you are. I have many ideas that such an operating
system could evolve into, but lack the knowledge of getting such a system to
boot. There are some problems.

Could we use Mono in it's entirety? Certainly the code for the base class
libraries (mscorlib, System, etc...) could be used. Mono's compiler could
also be used (perhaps slighly adjusted if need be). Its Virtual Execution
Environment would cause the biggest problem. Again, I haven't taken a look
at it in enough detail to make any real claims.

I wouldn't have any reservations against setting up a central location for
brainstorming ideas (a wiki and a Subversion code repository), if there were
enough people interested. The hardest part would be to get someone with
experience in system programming (someone who has created a simple kernel in
C/C++), who would lend a hand in the translation between C# to native code.
View this message in context: http://www.nabble.com/Re%3A--Mono-devel-list--Operating-System-in-C--Project-tf2349909.html#a7081676
Sent from the Mono - Dev mailing list archive at Nabble.com.

More information about the Mono-devel-list mailing list