A new direction...
Posted: Sun Jul 25, 2004 7:12 pm
I was sitting down, thinking things over, and kinda came up with a twist for my OS.
Up until now I've been doing things in a fairly standard fashion, but I've decided to juice things up a bit for amusement value. Thought I'd run a couple of the basics (I haven't thought this totally through yet) past the board and see if there are any huge gaping flaws.
The entire OS (Aside from what's required for the interpreter) gets written in code which is interpreted at runtime. The OS will not run binaries (Except from possibly a compiled cache), only byte-code.
Only code with certain privileges will be able to use instructions that translate to privileged processor instructions. So things like IO ports are restricted to privileged code.
Because I control the language, what context certain instructions are legal in and refuse to run arbitrary binaries there is no need to use any hardware memory protection. So no context switches.
The language will have no pointer operations (Which should be interesting to work around). So everything can run in the same address space.
Because of the level of control being imposed here, and having everything operate in a single address space, I can do away with paging entirely and let a software memory manager handle everything without fragmentation and with garbage collection (Probably with some virtual junk thrown in as well).
***
Not much, but hopefully you get the main thrust of the idea.
The major problem would be with the speed of interpreted code, which is why I'm leaving open the possibility of a compiled code cache.
There will be other problems I'm sure, I need to give it a lot more thought before it takes full shape, but I thought I'd ask for some input.
***
Some of you (There may be few of us left) might recognise that scheme as being very similar to a MUD driver. It should be, because it was finding my old LPC code that gave me the idea.
Up until now I've been doing things in a fairly standard fashion, but I've decided to juice things up a bit for amusement value. Thought I'd run a couple of the basics (I haven't thought this totally through yet) past the board and see if there are any huge gaping flaws.
The entire OS (Aside from what's required for the interpreter) gets written in code which is interpreted at runtime. The OS will not run binaries (Except from possibly a compiled cache), only byte-code.
Only code with certain privileges will be able to use instructions that translate to privileged processor instructions. So things like IO ports are restricted to privileged code.
Because I control the language, what context certain instructions are legal in and refuse to run arbitrary binaries there is no need to use any hardware memory protection. So no context switches.
The language will have no pointer operations (Which should be interesting to work around). So everything can run in the same address space.
Because of the level of control being imposed here, and having everything operate in a single address space, I can do away with paging entirely and let a software memory manager handle everything without fragmentation and with garbage collection (Probably with some virtual junk thrown in as well).
***
Not much, but hopefully you get the main thrust of the idea.
The major problem would be with the speed of interpreted code, which is why I'm leaving open the possibility of a compiled code cache.
There will be other problems I'm sure, I need to give it a lot more thought before it takes full shape, but I thought I'd ask for some input.
***
Some of you (There may be few of us left) might recognise that scheme as being very similar to a MUD driver. It should be, because it was finding my old LPC code that gave me the idea.