[Prev][Next][Index][Thread]

[Matthew Flatt <mflatt@cs.rice.edu>: MzScheme kernel]



This is pretty cool.  I had no idea it was happening.
Pretty quick work!

Also, maybe people have input on the non-blocking I/O problem.  I know
as part of the Doom patch file we distribute, Steve Clawson here
provides a patch to the ps/2 mouse driver to be non-blocking.

------- Forwarded Message
Date:    Sat, 19 Dec 98 13:32:36 -0600
From:    Matthew Flatt <mflatt@cs.rice.edu>
To:      plt-design@cs.rice.edu
cc:      lepreau@cs
Subject: MzScheme kernel

MzScheme 100/21 is now available in kernel form for x86 machines. In
other words, MzScheme can run as a stand-alone OS on your PC.

Practical? Perhaps eventually. For now, it's just fun. The MzScheme
kernel is based on OSKit from the Flux group at Utah.  Coverting
MzScheme to a kernel took about 5 hours, most of that being the time
to understand various aspects of the OSKit. I spent an additional 2 or
3 hours making MzScheme run as smooth as it does, but a little more
work is needed (as described below).

A LILO-friendly kernel is now available (on cs at Rice):

 /home/mflatt/zMzScheme

To install the kernel on a machine that already has Linux:

 1) Copy zMzScheme to / (or wherever you want).

 2) Edit /etc/lilo.conf, adding

     image=/zMzScheme
	label=mz
	root=/dev/hda6
	read-only

   but change /dev/hda6 to be whatever is in your
   image=/boot/vmlinuz-2.0.32 line, and adjust the path in the
   image=/zMzScheme line if you didn't put zMzScheme it in the root
   directory.

 3) Run `lilo' within Linux.

 4) Reboot.

 5) At the lilo boot prompt, type "mz" and hit return.

 6) Evaluate MzScheme expressions to your heart's content.

In principle, you don't even need Linux, and I can supply a kernel in
multiboot format if anyone wants it. (So far, I've only learned to
start kernels via LILO.)

The current MzScheme kernel is missing a few useful features:

 * No useful filesystem support. It looks like it's easy to support
   any filesystem that Linux supports, and I'll wire things together
   sometime. Meanwhile, when you start the current MzScheme kernel,
   you get an empty filesystem.  You can create files and directories,
   but they're stored in memory, not on disk.

 * No TCP support, yet. That's probably also straightforward to add.

 * Reading from stdin blocks all MzScheme threads. This seems to be a
   limitation of the OSKit's default stdin support (no non-blocking
   reads on stdin, and select() always claims stdin is ready to read),
   but if so, it looks like MzScheme can talk to the console directly
   to fix the problem.

Matthew

------- End of Forwarded Message