extreme mem usage under amd64 arch ?

Oliver Fromme olli at lurza.secnetix.de
Sat Apr 8 12:05:33 UTC 2006


Peter Jeremy <peterjeremy at optushome.com.au> wrote:
 > On Sat, 2006-Apr-08 12:21:46 +0200, Oliver Fromme wrote:
 > > > I suspect a python kernel would be painfully slow.......
 > > 
 > > Certainly.  I wasn't implying that Python would be well-
 > > suited to write an OS kernel in.  Unless someone builds
 > > a processor that executes Python bytecode natively.
 > 
 > Squeak (a smalltalk dialect) has its kernel written in a subset of
 > squeak which can be either interpreted or compiled into assembler.
 > The former maintains the development/testing advantages of an
 > interpreter and the latter makes it run at a decent speed.  You may be
 > able to do the same with Python.

In fact, that's already possible.  This is one of the
advantages of the Python grammar being relatively simple
and well-designed:  It's easy to write independent
implementations of it.

Besides the standard Python implementation (which comes
with an interactive interpreter and a bytecode generator)
there are several other implementations of the Python
language, including compilers such as "Pyrex" that create
C code which can be compiled into native binaries (and is
easy to interface with other C programs).

 > Alternatively, JIT techniques have
 > received an enormous amount of effort over the past decade (thanks to
 > Java) and a JIT Python may be reasonable.

In fact, that's already possible.  :-)
For example, using "Psyco" (a JIT compiler for Python):
   http://psyco.sourceforge.net/introduction.html
or "Jython" (a Python implementation in Java that creates
Java bytecode):
   http://www.jython.org/docs/whatis.html

 > >   Oliver  (right now busy writing a boot manager in assembler)
 > 
 > Not Python?? :-)

Well, that would have been an option if there were no space
concerns.  That or O'Caml.  :-)

However, it must be able to run from an ISO9660 sector,
using ElTorito "no emulation mode", so it must fit in 2048
bytes.  The Python runtime library is a little bit larger
than that.

Best regards
   Oliver

-- 
Oliver Fromme,  secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing
Dienstleistungen mit Schwerpunkt FreeBSD: http://www.secnetix.de/bsd
Any opinions expressed in this message may be personal to the author
and may not necessarily reflect the opinions of secnetix in any way.

"That's what I love about GUIs: They make simple tasks easier,
and complex tasks impossible."
        -- John William Chambless


More information about the freebsd-amd64 mailing list