Valix: An OS, a Plan
Posted: Tue Jul 07, 2009 10:30 pm
I'm doing a (free) operating system (just a hobby, won't be big and professional like linux) for 32-bit PCs . It's called Valix, and it's a multiboot compliant pmode OS with memory protection. Valix so far has mouse and keyboard drivers, as well as a textmode VGA driver and a virtual file system; I'm planning on adding preemptive multitasking as well soon. Valix will be licensed under the GPL version 3, though I have yet to really release it.
What I'd rather discuss are my plans for the operating system as a whole. Valix is written almost entirely in C, but I'd like all its userland applications to be interpreted by an interpreter that is integrated into the kernel. I'm not entirely sure on the implementation, but I'd like the planned scripting language to be similar to either smalltalk or python, maybe a subset of one or a mix of both. This interpreter will act not only as the system shell but also as the runtime for all applications. I wonder what this plan might entail. Here are some speculations:
- Since the kernel interprets everything, and essentially has control of all processes, is it necessary to have any sort of kernel/user separation? (ring 0, ring 3) The only machine code in the memory would be kernel code.
- Would there be a way of speeding up user applications, since the interpreter is part of the kernel? Of course the interpreter wouldn't be as fast as pre-compiled C code, but could the kernel handle certain optimizations in the way it interprets the code? I'm thinking for multitasking, instead of having multiple interpreter processes, only one interpreter that switches between which script it is interpreting? I'm not an expert on how multitasking works, so I don't know how feasible this is.
- Does anyone have any experience with interpreters? Where are some good places to get started learning their internals? The wiki, at least, offers no information on this, understandably; creating programming languages is usually more separate from OS developing.
All these questions are asked to make sure that I complete my goal The Right Way (tm). If anyone is interested in my fledgling OS, I could probably scrape together some source code , though I remind everyone it is a work in progress. Thanks for help, discussion, critique, etc.
note: I put this in design and theory mostly because I'm not stuck on one implementation flaw but rather I'm wondering about the whole idea behind interpreters and what that might mean for my OS.
What I'd rather discuss are my plans for the operating system as a whole. Valix is written almost entirely in C, but I'd like all its userland applications to be interpreted by an interpreter that is integrated into the kernel. I'm not entirely sure on the implementation, but I'd like the planned scripting language to be similar to either smalltalk or python, maybe a subset of one or a mix of both. This interpreter will act not only as the system shell but also as the runtime for all applications. I wonder what this plan might entail. Here are some speculations:
- Since the kernel interprets everything, and essentially has control of all processes, is it necessary to have any sort of kernel/user separation? (ring 0, ring 3) The only machine code in the memory would be kernel code.
- Would there be a way of speeding up user applications, since the interpreter is part of the kernel? Of course the interpreter wouldn't be as fast as pre-compiled C code, but could the kernel handle certain optimizations in the way it interprets the code? I'm thinking for multitasking, instead of having multiple interpreter processes, only one interpreter that switches between which script it is interpreting? I'm not an expert on how multitasking works, so I don't know how feasible this is.
- Does anyone have any experience with interpreters? Where are some good places to get started learning their internals? The wiki, at least, offers no information on this, understandably; creating programming languages is usually more separate from OS developing.
All these questions are asked to make sure that I complete my goal The Right Way (tm). If anyone is interested in my fledgling OS, I could probably scrape together some source code , though I remind everyone it is a work in progress. Thanks for help, discussion, critique, etc.
note: I put this in design and theory mostly because I'm not stuck on one implementation flaw but rather I'm wondering about the whole idea behind interpreters and what that might mean for my OS.