[Mono-dev] [Mono-devel-list] Operating System in C# Project
Brian Crowell
mono-devel at fluggo.com
Mon Oct 30 21:23:00 EST 2006
Johann MacDonagh wrote:
> Actually if it's all the same, I'd like to keep this operating system
> separate from the Unix mentality. That's not to say we wouldn't borrow some
> of Unix's ways of doing things, but there are certain things that would need
> to be changed.
There are lots of things to address, for sure. Device drivers are a hairy issue all by themselves, but I could see you encapsulating things like IRQs and I/O ports into classes.
One good place to start might be to write a file-system driver. You would assume that the operating system would hand you a stream tailored for block devices (e.g. BlockStream) and you just go to town. I'd design it at three levels:
* The classes and structures that encapsulate various internal states of the file system (e.g. inodes, directories, journals)
* A class that encapsulates all the external behavior of the file system (e.g. EfsFileSystem) upon being given a block device, where you can ask for streams and query/set attributes, but which knows nothing about other loaded drivers, or even about the system at all
* A class that presents the file system to the operating system (e.g. EfsFileSystemComponent)
Certainly a lot of good ideas and good sample code can come from Unix. One question will come up right away: what do we port, and what do we re-write? In practice, I've rarely been satisfied when porting projects to C#. It's one thing to wrap an API, but to try to translate pointer/error code mentality to reference/exception mentality on the fly is rough. I suggest we re-write most things, with an eye toward using testing to achieve compatibility, rather than hoping that we get the translation right.
> SharpOS.org isn't taken. Kind of shows both sides of the issue.
Sounds awesome to me.
> If there was enough brains behind this, then I wouldn't mind paying for some
> shared hosting on a separate domain name. Set up a wiki (for brainstorming,
> designing), svn, and perhaps some forums (I prefer them over mailing lists).
I like mailing lists because I get them in my mail client; I don't have to browse anywhere, remember passwords, or learn yet another bulletin board system. My two cents.
Speaking of two cents, I'd be willing to chip in on hosting costs. Actually, I've been meaning to try out virtual hosting for awhile; those things almost look too good to be true, at US$50/month.
--Brian
More information about the Mono-devel-list
mailing list