Python Operating System???

Paul Rubin http
Sun Jan 9 22:17:00 EST 2005


"Roose" <b at b.b> writes:
> > I've written file systems in Python, and task schedulers in
> > Javascript, and they were fine for their purposes
> 
> Uh, not to be rude, but what are you talking about?  If I'm not mistaken
> Javascript is that scripting language that runs inside a browser, 

Correct.

> an application.  How are you going to save and restore CPU state in
> Javascript, or even call assembly that does it in Javascript?  How
> do you switch into kernel mode in Javascript?  We are on completely
> different pages apparently.

Correct.

> Upon reading back in the thread I see that you mean compiled Lisp,
> no?  I was thinking that there would be a Lisp interpreter in a
> kernel, which afaik doesn't exist.

Yes, compiled Lisp.  There are Python compilers too.

> In any case, as I said before I don't think it is impossible, just a
> poor engineering decision and I don't see the rationale behind it.

I don't see a convincing case against writing an OS even in
interpreted Python, though of course I'd want it to be compiled if
possible.

What do you think OS's do, that Python wouldn't be suitable for?  Your
examples of task switching and virtual memory are unconvincing.  Those
just require setting up some suitable tables and then calling a
low-level routine to poke some CPU registers.  File systems can be
more performance intensive, but again, in those, much of the cpu drain
can be relegated to low-level routines and the complexity can be
handled in Python.



More information about the Python-list mailing list