Python Operating System

P

PythonUsr

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)
 
D

Diez B. Roggisch

PythonUsr said:
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/academic/product/0,1144,0131429388,00.html

Diez
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,069
Latest member
SimplyleanKetoReviews

Latest Threads

Top