Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Python Operating System

Reply
Thread Tools

Python Operating System

 
 
PythonUsr
Guest
Posts: n/a
 
      12-10-2006
Although I know for a fact that an Operating System can be written in
Python, I need to ask some questions to the more advanced users of
Python.

Uuu and Cleese are two operating systems that were / are written in
Python. Does anyone use them? If so, how do they function / feel? Do
they have a graphical mode and a command line mode, such as Linux does?

How hard would it be to write a full blown bootable operating system in
Python? With a command line and a GUI in all? Would the books you see
on the shelves at, say, Barnes and Noble, do the trick? Or do you need
to dig deeper into the language than what is taught in the 1,000 page
books?

Thanks in advance, and I am truly sorry if this has been a discussion
before in this group!

-- Alex (PythonUsr)

 
Reply With Quote
 
 
 
 
Diez B. Roggisch
Guest
Posts: n/a
 
      12-10-2006
PythonUsr schrieb:
> Although I know for a fact that an Operating System can be written in
> Python, I need to ask some questions to the more advanced users of
> Python.
>
> Uuu and Cleese are two operating systems that were / are written in
> Python. Does anyone use them? If so, how do they function / feel? Do
> they have a graphical mode and a command line mode, such as Linux does?
>
> How hard would it be to write a full blown bootable operating system in
> Python? With a command line and a GUI in all? Would the books you see
> on the shelves at, say, Barnes and Noble, do the trick? Or do you need
> to dig deeper into the language than what is taught in the 1,000 page
> books?


There are limits to what Python can do as a language for OS development.
For example, Python has no notion of pointers and thus makes
writing interrupt routines impossible, which are the base for nearly all
lower level OS tasks like IO-drivers, memory virtualization and the like.

What these projects are more like is a bootable interpreter on a minimal
OS kernel. At least in my book that doesn't count as an operating
system, but here definitions might vary. Yet it certainly isn't a
general purpose OS, as no binary interfaces to OS services are defined
that would make calls from other languages into the OS possible.

In other words: IMHO, it is _not_ possible to write an OS in Python, at
least not if OS is understood the way current OSses work. And even if
the definition is stretched, there is a more than fair amount of work
that needs to be done in other languages, most likely C - either because
Pyhon isn't capable of doing them at all, or just not fast enough to do
them proper.

Regarding the books to read: this kind of programming isn't so much
about the details of python, albeit some of its inner workings like the
GIL put up quite a few hurdles for the aspiring OS programmer, but of OS
concepts and designs. Which is a field Andrew Tanenbaum has earned quite
a few merits, so I guess his book could be a starter:

http://vig.prenhall.com/catalog/acad...429388,00.html

Diez
 
Reply With Quote
 
 
 
 
Richard Jones
Guest
Posts: n/a
 
      12-11-2006
Diez B. Roggisch wrote:
> Python has no notion of pointers


See:

http://docs.python.org/lib/module-ctypes.html

In particular:

http://docs.python.org/lib/ctypes-pointers.html


Richard

 
Reply With Quote
 
Diez B. Roggisch
Guest
Posts: n/a
 
      12-11-2006
Richard Jones schrieb:
> Diez B. Roggisch wrote:
>> Python has no notion of pointers

>
> See:
>
> http://docs.python.org/lib/module-ctypes.html
>
> In particular:
>
> http://docs.python.org/lib/ctypes-pointers.html


Certainly cool, yet not too helpful for writing an interrupt handler
that needs to run lightning fast & without prior GIL acquisition.

Also PyPy with RPython might someday add much to the low-level
programming capabilities, but a pure Python OS isn't feasible IMHO right
now.

Diez
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
connecting both computers with different operating system together naderbd Wireless Networking 1 07-29-2005 12:47 AM
Python Operating System??? David Brown Python 54 01-15-2005 03:02 AM
Sun to Give Out Operating System for Free Rich Firefox 7 11-16-2004 07:47 PM
How to get the Operating System info like ( Wireless info, Wireless connection) Vasanth Perl 0 06-28-2004 08:56 AM
Re: 32 bit operating system Consultant MCSE 0 01-08-2004 02:58 PM



Advertisments