Python OS

Richard Blackwood richardblackwood at cloudthunder.com
Sun Nov 7 14:12:56 EST 2004


Diez B. Roggisch wrote:

>>Do you mean that there are no entirely C OSs?
>>    
>>
><LOTS OF SWELL CODE SNIPPED>
>
>Now one can argue if that is still C, as it's written in a cpp-file thats
>run through a compiler - but if that really counts as C, then of course you
>can write anything in python (or VB or whatever languague you choose) by
>simply writing out hexdigits to a file....
>  
>
Looks like a Hybrid.

>  
>
>>Understood, however, note the terms prototype and virtual.  Perhaps I
>>could create virtual hardware where needed, and play around with the
>>timing issues in this manner (emulate them and create solutions
>>prototyped in Python).
>>    
>>
>
>In you first post, you didn't mention virtual - only prototype. And
>prototyping an OS for whatever hardware can't be done in pure python. Thats
>all that was said. 
>
>Writing a virtual machine for emulation can be done in python of course. But
>then you can't write a OS for it in python as well (at least not in
>CPython )- as your virtual machine must have some sort of byte-code, memory
>model and so on. But the routines you write for the OS now must work
>against that machine model, _not_ operate in CPython's execution model
>(which is based on an existing os running on real hardware)
>
>  
>
All of that can be virtually emulated (virtual memory and so forth).

>But creating a VM only leverages that work to the next level, retaining the
>initial problems. If you don't do it that way, you don't prototype anything
>like an OS nor implement a machine model but instead meddle some things
>together by creating a machine model that is so powerful (e.g. has an
>built-in notion for lists, dicts and the like) that it can't be taken
>seriously as educational for writing an OS - at least to me, as the virtue
>of writing an OS is to actually _deal_ with low-level matters, otherwise
>there is no challenge in it. 
>  
>
*laugh*  Now that is hilarious.

>I don't say that this is not a worthy project to undertake for educational
>purposes - but I wouldn't call it an OS, as it does not teach what creating
>an OS from scratch is supposed to teach.
>  
>
Understood.

>For example you can't write a OS for the JAVA VM, as there is no such things
>like interrupts defined for it - instead IO happends "magically" and is
>dealt with on the low level with the underlying OS. The VM only consumes
>the results.
>
>  
>
This has been done as well, there are Java operating systems were IO is 
handled by Java and not magic, or so I understand.



More information about the Python-list mailing list